IE ignoring conditional comment when I use server name

北慕城南 提交于 2019-12-24 02:42:24

问题


I have a web page with the following code in it:

<!--[if IE 8]>
Welcome to IE 8
<![endif]-->

I am logged onto the server, and if I hit the page in IE 8 via the URL http://localhost/login I see the message. However, if I use the URL http://myserver/login (where myserver is the Windows name of the server I am logged into), the page displays and functions normally, except that the message is not displayed.

If I do a View Source, I see the code as I expect it -- the comment displays in the source. (OK, I'm really trying to load a conditional style sheet and it is not being loaded when I use the server name, but this simple example shows the same result).

Any ideas how to exit this new trip to IE bizarro-land?


回答1:


In Page Settings, do you have 'Display intranet sites in Compatibility View' checked? It's all explained in this blog post.



来源:https://stackoverflow.com/questions/13779451/ie-ignoring-conditional-comment-when-i-use-server-name

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