I'm using a script that detects Javascript errors and reports them to my backend. However I am getting cryptic "script error" messages, which is not very helpful for debugging.
According to Cryptic "Script Error." reported in Javascript in Chrome and Firefox the reason is because the script that threw the error is served from a different origin than my site.
Since I'm using a CDN all of my scripts are effectively served from another domain. Is there a way to get more useful error messages while still using a CDN?
Also everything is served over SSL so I would like to retain this ability.
<script src="http://foo.com/bar.html">), which doesn't work AFAIK. But that's not what you're doing, right? You're loading .js files from different domains which is OK (e.g.<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js">). A web-page can load JavaScript files from any domain - that will work and won't throw an error.