简体   繁体   English

如果IE8兼容则弹出

[英]Popup if IE8 compatibility

I have been searching the web looking for answers...here is what I need that I am not getting. 我一直在网上寻找答案...这是我没有得到的。

Pre-information 预先信息

  • Running a Wordpress site 运行Wordpress网站
  • Site isn't loading correctly when using IE8 Compatibility (9 is fine). 使用IE8兼容性时网站无法正确加载(9很好)。
  • Have implemented the quick fix 实施了快速修复

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

    and even 乃至

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

    This does not solve the issue. 这不能解决问题。

  • I need a javascript solution for various reasons 由于各种原因,我需要一个javascript解决方案
  • The idea is that when a user has compatibility mode turned on, a message will appear that tells the user to turn it off. 这个想法是,当用户打开兼容模式时,将出现一条消息,告诉用户将其关闭。

    I know that this has something to do with it but I don't know how to code it in javascript to do something. 我知道这与它有关,但是我不知道如何在javascript中编码以完成某事。

    IE8 Compatibility View: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0;...)
    

    X-UA-Compatible (either meta element or HTTP response header) with IE=edge value reliably prevents user from switching to compatibility mode by clicking button at the right of location bar — since the button is not shown at all when X-UA-Compatible with IE=edge value is present. IE=edge值的X-UA-Compatible (元元素或HTTP响应标头)可以可靠地阻止用户通过单击位置栏右侧的按钮切换到兼容模式-因为当X-UA-CompatibleIE=edge X-UA-Compatible IE=edge值存在。

    Ability to switch modes via developer tools (opening via F12 key) is not an issue — this is development feature which state does not persist after browser is restarted so is totally safe and is not something to care about. 通过开发人员工具切换模式的能力(通过F12键打开)不是问题-这是开发功能,重新启动浏览器后状态不会持久,因此完全安全,无需在意。

    However, if page works incorrectly in IE8 compatibility mode, then it very likely works incorrectly in real IE8 too. 但是,如果页面在IE8兼容模式下无法正常工作,那么它很可能在实际的IE8中也无法正常工作。 So if support for IE8 is important for you, you should fix issues related to IE8 itself, not to compatibility-mode feature. 因此,如果对IE8的支持对您很重要,则应解决与IE8本身有关的问题,而不是与兼容模式功能有关的问题。

    声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM