每隔一段时间IE 9都无法加载javascript资源

Zek*_*mer 5 javascript internet-explorer internet-explorer-9 requirejs

每隔一段时间,当我加载我的网站大约五分之一时,它无法加载网站,并在IE 9控制台中说:

SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined 
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined 
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'extend': object is null or undefined 
Module.js?ts=@@timestamp, line 52 character 3
SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined 
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'View': object is null or undefined 
View.js?ts=@@timestamp, line 8 character 3
SCRIPT5007: Unable to set value of the property 'Validation': object is null or undefined 
backbone.validation.js?ts=@@timestamp, line 15 character 3
SCRIPT5007: Unable to get value of the property 'extend': object is null or undefined 
Class.js?ts=@@timestamp, line 10 character 3
SCRIPT5007: Object expected 
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5007: Object expected 
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5007: Object expected 
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5022: Load timeout for modules: css!lib/foundation/style_unnormalized2,css!lib/icon-font/fontcustom_unnormalized3,css!lib/icon-font/icon-font_unnormalized4,hbs!modules/header/HeaderTemplate_unnormalized5,css!modules/header/HeaderStyle_unnormalized6,hbs!lib/components/avatar/AvatarTemplate_unnormalized7,css!lib/components/avatar/AvatarStyle_unnormalized8,hbs!modules/login/LoginTemplate_unnormalized9,css!modules/login/LoginStyle_unnormalized10,hbs!modules/header/HeaderTemplate,hbs!lib/components/avatar/AvatarTemplate,hbs!modules/login/LoginTemplate
http://requirejs.org/docs/errors.html#timeout
require.js, line 1758 character 9
Run Code Online (Sandbox Code Playgroud)

令人困惑的是它只是偶尔发生它可能是我需要我的javascript文件的方式吗?

Dal*_*rzo 0

这似乎与JQuery中发生的类似问题有关

这都是关于 DOM 未准备好,并且由于 DOM 未完全加载,因此发生此错误,这也解释了您提到的“随机”行为。

如果您还没有这样做,请尝试在页面末尾添加脚本或某种延迟加载:

顺便说一句,关于这方面的唯一帖子似乎微软拒绝了它,并不认为它是一个错误:

https://connect.microsoft.com/IE/feedback/details/792880/document-readystat