开发者

How to open local HTML document in IE compatability mode?

开发者 https://www.devze.com 2023-02-28 19:28 出处:网络
I created a quick and dirty HTML file to demonstrate an issue I am encountering in IE compatibility mode.When I open it in IE8 from my desktop, it opens in standard mode.I need to be able to switch it

I created a quick and dirty HTML file to demonstrate an issue I am encountering in IE compatibility mode. When I open it in IE8 from my desktop, it opens in standard mode. I need to be able to switch it to compatibility mode, but the icon for that disappears when I am 开发者_如何学Cviewing a local HTML document. What's up with that?

UPDATE: None of the three proposed solutions has resulted in the compatibility mode icon showing in IE8. Instead, I have put my code into an .aspx page and executed it through Visual Studio. Since it's originating from localhost, the browser thinks it is a remote document and is displaying the compatibility icon like I wanted.

However, if anyone can get this to work without having to do that, I am still open to ideas since launching a web app isn't really the ideal solution for me.


I'm not sure whether this'll work because of IE's many crazy exceptions and rules regarding local files and compatibility mode, but try the META tag approach.

In your <head>, for example say:

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

See understanding compatibility modes to make sure you pick the right one.


You could try pressing F12 to open the developer toolbar, and change it in there.

Update: Have you tried tools > compatibility view settings > display all websites in compatibility view?


Users can override the ‘local intranet’ setting by un-checking ‘Display intranet sites in Compatibility View’ at Tools -> Compatibility View Settings.

http://blogs.msdn.com/b/ie/archive/2009/06/17/compatibility-view-and-smart-defaults.aspx


None of the three proposed solutions has resulted in the compatibility mode icon showing in IE8. Instead, I have put my code into an .aspx page and executed it through Visual Studio. Since it's originating from localhost, the browser thinks it is a remote document and is displaying the compatibility icon like I wanted.

However, if anyone can get this to work without having to do that, I am still open to ideas since launching a web app isn't really the ideal solution for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号