- CORS Essentials
- Rajesh Gunasundaram Randall Goya
- 79字
- 2021-07-09 19:53:42
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
![](https://epubservercos.yuewen.com/DCCD7E/19470408608963606/epubprivate/OEBPS/Images/3.jpg?sign=1739611280-AWbEnE8ESTjtwlYPBdi7GxhWh7rtTDOx-0-187922bf123241f5cd528f409aa15e54)