views:

38

answers:

1

Hi,

I'm trying to setup compatibility mode in one of our web products however I cannot get compatiblity mode to work via a particular server.

To recount what I've done so far:

  1. I've set the the HTTP header X-UA-Compatible in IIS to IE=7

  2. I've set also addded the meta element as the first element in the head element to the master page:

Using fiddler I've checked the HTTP traffic and I can see the header value and the meta element. Using the same browser (different tab) when I point to our staging server the document renders as IE7 brower mode and IE7 document mode. Which is great. Unfortunately when I point to the live server which is configured in the same way as the staging server the document renders as IE8 browser mode and IE7 document mode.

As a result when I check the dev tools the CSS which is being applied to the html element is

" ie ie8 CSS1Compat Win32"

vs

" ie ie7 CSS1Compat Win32"

Has anyone got any suggestions what I might have missed?

Note there is a blank line before DOCTYPE instruction (which is meaningful).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.backbase.com/2006/btl"
    xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:e="http://www.backbase.com/2006/xel"
    xmlns:c="http://www.backbase.com/2006/command" xmlns:d="http://www.backbase.com/2006/tdl"
    xmlns:x="http://woodmac.com/x"&gt;
    <head><meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><meta http-equiv="expires" content="-1" /><meta name="robots" content="index,follow" />
        <script type="text/javascript" src="Backbase/engine/boot.js"></script>

    <link href="App_Themes/MANDA/print_style.css" type="text/css" rel="stylesheet" /><link href="App_Themes/MANDA/screen_style.css" type="text/css" rel="stylesheet" /></head>
    <body>

Thanks,

Philip

A: 

Take a look at this site and see if you missed anything. It may be related to the doctype, but it looks like the meta tags should override that.

Tommy
Thanks, when I cleared down my cache both the staging and live sites started to operate consistently... unfortunately not on the side of IE7 browser mode. They are now both rendering in IE8 Browser Mode, despite the Header and meta tag. The document mode is IE7 though...
Philip
Post the first few lines of your HTML output that you are getting back from the server. Not from fiddler, but actual view source from within IE...
Tommy
I had a good read of that article you pointed me at. Looking at http://blogs.msdn.com/b/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx which links off of that article.Compatibility View and the X-UA-Compatible tag are not equivalent, unfortunately this means " ie ie8 CSS1Compat Win32" has a bearing on which CSS gets applied.
Philip
Don't know about you, but I am feeling the love for IE in this thread right now :)
Tommy