Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Chrome "Script error." #28

Open
AhoyLemon opened this issue Oct 16, 2018 · 1 comment
Open

iOS Chrome "Script error." #28

AhoyLemon opened this issue Oct 16, 2018 · 1 comment

Comments

@AhoyLemon
Copy link
Owner

This shows up a lot in @TrackJs

image

It's specific to iOS Chrome

@AhoyLemon
Copy link
Owner Author

trackJS offers the following...

Script Error

If your page loads scripts from different domains, you might see a lot of Script Error messages. These unhelpful messages occur because the browser's same-origin security policy is preventing the error information from one domain (hosting scripts) from leaking to another (your page). There are three ways to solve this:

Cross-Origin Resource Sharing

Modern browsers (latest Chrome and Firefox) will honor the CORS headers when chosing whether to expose error information between domains. The hosting server must have CORS Headers enabled. Then, when including the script tag, add the crossorigin attribute to the tag.

<script src="//hosted.com/path/to/script" crossorigin="anonymous"></script>
Check out this blog post for more information about CORS scripts.

AhoyLemon added a commit that referenced this issue Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant