Firefox:“加载脚本时出错” [英] Firefox: "Error loading script"

查看:152
本文介绍了Firefox:“加载脚本时出错”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我快速点击我网站上的不同链接(Asp.Net MVC + jQuery,完整的回发),FireFox 3下发生加载脚本错误。重现这个bug是相当容易的。但我不明白为什么会发生?每次它显示不同的失败的脚本文件。所有JavaScript文件都包含在结束标记之前。



错误被困在window.onerror处理程序中。如果我简单地忽略错误消息错误加载脚本一切工作正常。但这似乎不是最好的解决办法,肯定有一些原因。这是一个遗憾,但这个帖子对我没有帮助: Firefox'错误加载脚本在FF2中加载Google Analytics(分析)



描述类似问题的另一个资源:

浏览器脚本错误...





有错误日志条目:

 错误信息:Error loading script
Location.href:http:// blah-blah-blah / General
网址:http://blah-blah-blah/Scripts/localization/locale-uk.js
行:1
UserAgent:mozilla,1.9.0.11

你能帮我解决这个烦人的bug吗?感谢。

如果您在链接之间快速点击,您可能会简单地中断某些GA脚本的加载过程在不同的点(因此随机性)。



也许当你这样做,你会得到一个错误信息,它可能只适用于以前加载的页面。

"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.

解决方案

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.

这篇关于Firefox:“加载脚本时出错”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆