FIXED: Webpages display correctly without using Compatibility Mode

Something strange started happening with Internet Explorer last year.  When IE10 turned up, it seemed like it rewrote the rule book on how the browser displays web pages.   For instance, if you hadn’t coded your font name in your style sheets absolutely correctly, then you had to deal Times New Roman.

Time's New Roman

That’s not what I meant!

Now of course, one should code their style sheets correctly.  But realistically, the rules change too often and there’s just too many pages I’ve built while on a learning curve.  I do not believe anyone can be reasonably expected to maintain and update static pages as browser standards change.

If you disagree…

Good for you.  Well done on having a differing opinion.  This post is not for you.  This post is to help others like me beat the system.

The Compromise

So, if something stops working in the latest version of the browser, you can switch on Compatibility Mode/View.  The problem with this is it displays everything like it’s in IE6/7.   Which means you lose anything clever or fancy.

The Solution

What’s needed is some way of telling IE to use all the bits you have at the time of coding, but don’t change things when you add new features.

And thanks to a long Google search (not having a clue what to search for) I eventually found this:

<meta http-equiv=”x-ua-compatible” content=”IE=9>

This single line of code at the top of a webpage, tells IE to run a webpage as if it is displaying it in Internet  Explorer 9, or 10 (content=”IE=10″) etc…

I love the simplicity of this.  It gives me the freedom to build a site/system however I need to and I know that there won’t be a massive panic when the browser updates and suddenly some bit of jQuery/CSS stops working.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: