views:

302

answers:

1

"Error loading script" occurs under FireFox 3 if I "quickly click" different links on my web site (Asp.Net MVC + jQuery, full postbacks). It is rather easy task to reproduce this bug. But I cannot understand why it occurs? Every time it shows different failed script file. All JavaScript files are included before closing tag.

Errors are trapped in window.onerror handler. If I simply ignore errors with message 'Error loading script' everything works fine. But this seems to be not the best solution, there must be some reason. It's a pity but this post was not helpful for me: Firefox ‘Error loading script’ loading Google Analytics in FF2

Another resources that describe similar problem:

Browser Scripting Errors ...

Firefox 'Error loading script ' issue when implementing GA scripts.

There is error log entry:

Error message: "Error loading script"
Location.href: http://blah-blah-blah/General
Url: http://blah-blah-blah/Scripts/localization/locale-uk.js
Line: 1
UserAgent: mozilla, 1.9.0.11

Can you help me with this annoying bug? Thanks.

+1  A: 

If you're quickly clicking between links, you may simply be interrupting the load process of some of the GA scripts at different points (hence the randomness).

Perhaps when you do that and you get an error message, it may only apply to the page that was previously loaded.

Maciek
Yes, I have similar suggestions. But I do not understand why FireFox throws error for 'already unloaded page'? IE for example silently do nothing in this case. Looks like that simply ignoring this error is best real solution.
Roman