window.applicationCache 在 IE11 中未定义
window.applicationCache is undefined in IE11
我正在使用应用程序缓存来保存我的页面,到目前为止,在 Chrome 和 Firefox 中一切正常,没有一个错误。但是,在 Internet Explorer 中,我总是会在尝试使用 window.applicationCache 未定义时收到错误消息。在控制台中输入 console.log(window.applicationCache);
也会导致 undefined
(以防加载内容出现问题)。谁能帮我解决这个问题?
我找到了解决方案:有人在 index.html 的头部放了一个 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
标签,这样 IE 就假装不知道 window.applicationCache
,因为它是在版本 10 中添加的。
我正在使用应用程序缓存来保存我的页面,到目前为止,在 Chrome 和 Firefox 中一切正常,没有一个错误。但是,在 Internet Explorer 中,我总是会在尝试使用 window.applicationCache 未定义时收到错误消息。在控制台中输入 console.log(window.applicationCache);
也会导致 undefined
(以防加载内容出现问题)。谁能帮我解决这个问题?
我找到了解决方案:有人在 index.html 的头部放了一个 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
标签,这样 IE 就假装不知道 window.applicationCache
,因为它是在版本 10 中添加的。