0

I have a blogger which won't load in anything newer than IE7. What I have done as a temporary fix is use this meta code after the head tag to force the document into IE7 standards mode.

<meta content='IE=7' http-equiv='X-UA-Compatible' />

It detects that the page is IE7 standards mode by default, but still loads the page in IE9 standards mode in IE9 for example. Essentially, I need to force it to load IE7 standards mode by default.

Could this be to do with the fact that I am using A HTML 5 doctype? Here is the code up to the meta tag...

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta content='IE=7' http-equiv='X-UA-Compatible' />

Any ideas guys?

Matt Maclennan
  • 1,232
  • 12
  • 40
  • Judging from this thread - http://stackoverflow.com/questions/6771258/ - you may want to try IE=EmulateIE7. Not sure if this will do the trick or not. – Adam Sep 24 '13 at 12:22
  • Hi there, thanks for the suggestion! Just tried this, and didn't make a difference. Still loads using IE9 Standards. – Matt Maclennan Sep 24 '13 at 12:23
  • Problem: You've got an xml header and an html5 doctype. html5 is not xml; get rid of the xml bits. I don't know whether this is related or not, but it is definitely wrong. – Spudley Sep 24 '13 at 12:28
  • Out of interest, why do you want to go into IE7 mode? What is wrong with IE9 standards mode? Especially if you're going with html5, it implies that you're trying to write your code to modern standards, so IE9 mode ought to fit the bill better than IE7 mode? – Spudley Sep 24 '13 at 12:31
  • @Spudley Hi there, removed the XML line as a temporary measure, and that had no effect. In answer to your second question, it is coded to modern standards (I personally did not code the template, taken it on from another dev), however, I have done a cross-browser check, and came up with this issue, so just need a quick fix to get the blog up and running. Hope that clarifies? – Matt Maclennan Sep 24 '13 at 12:34
  • fair enough. It's worth pointing out that IE's compatibility modes are generally not a perfect replica of the older IE version. IE7 mode in particular is known to have some serious bugs that make it different from a real copy of IE7. In general I would avoid compatibility mode at all costs. If you *must* use it, make sure you test it in all IE versions as well as a real copy of IE7, because there are some nasty "gotchas" to beware of. – Spudley Sep 24 '13 at 12:38
  • Re the problem in the question, the only other thing I can think of is that I've never seen it with the `content` declared before the `http-equiv`. Try switching those two around. (I know, it shouldn't make any difference, but it's the only thing I can think of for the moment) – Spudley Sep 24 '13 at 12:40
  • Have tried it the other way round with no luck. I have compared a live IE7 version with a compatibility mode version, and there are no real issues in terms of aesthetics. Thanks for the ideas though! :) – Matt Maclennan Sep 24 '13 at 12:46

0 Answers0