简体   繁体   中英

X-UA-Compatible in a intranet for IE8

I have some static HTML pages for a mockup design. The HTML pages are working perfectly standalone in ie8, ie9, chrome, mozila and safari.

When I deploy them onto the server(WCS) for intranet development, it is not aligned properly only in IE8 but they display correctly in other browsers including ie9.

I have two questions:

  1. I think I don't have CSS issues if I have that CSS issues it does not work in the standalone pages also in ie8. Am I correct?
  2. Do I need to give any X-UA-Compatible setting to IE=edge from server side???

I would always choose a X-UA-Compatible value of IE=edge,chrome=1

This way you always get the latest rendering engine in IE and are future save, if you are wise.

If you see, that some things don't work in IE8 you should use modernizr and/or polyfills. You have to google these because I cannot describe them in detail here.

In your case thare will be many possible answers

  1. Sometimes Browsers behave differently when displaying a local file (protocol file://) or a webserver document (protocol http://)
  2. Do you have default setting of X-UA-Compatible as HTTP header on your webserver (inspect with Firefox Firebug, Net tab)
  3. Is the Compatibility mode broken (See if you have a torn apart page symbol in your IE8/9 address field, see here: http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/features/compatibility-view )

Else you will have a CSS issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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