Troubleshooting and debugging CORS
Detecting problems with CORS requires enabling the crossorigin attribute in the <script>
tag.
Normal script tags will pass the least information to window.onerror for scripts that do not pass the standard CORS checks. To allow error logging for sites that use a separate domain for static media, several browsers have enabled the crossorigin
attribute for scripts using the same definition as the standard crossorigin attribute for the <img>
tag.
Browser support for crossorigin attribute in the <script> tag
Browser | Chrome | Firefox Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Crossorigin attribute support | Version >= 30.0 | Version >= 13 | Not supported | Version >=12.50 | (Yes) |