Forcing intranet users to view webpage in IE8 mode, not compatibility mode [duplicate]

与世无争的帅哥 提交于 2019-12-06 12:25:14

问题


Possible Duplicate:
Override intranet compatibility mode IE8

Although I'm specifying

 <meta http-equiv="X-UA-Compatible" content="IE=8" />

But due to IE's "Display intranet sites in Compatibility View" setting, my app isn't being viewed in IE8, but in compatibility mode.

Anyone know if there is a way round this???


回答1:


This will help you.

if (window.navigator.appName == "Microsoft Internet Explorer"){
    // This is an IE browser. What mode is the engine in?
    if (document.documentMode==8) // IE8
    {
        alert('IE8')
    }
    else
    {
        alert('Not IE8 or in Compatibilty mode');
    }
}

according to false status (not IE8 or in Compatibilty mode) you can redirect the user to a page that says how to set his/her browser. I wonder to know if there is an automatic script to do this?



来源:https://stackoverflow.com/questions/3047154/forcing-intranet-users-to-view-webpage-in-ie8-mode-not-compatibility-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!