Jay Na
Jay Na

Reputation: 837

Are websites expected to work properly in IE compatibility mode?

I am observing some horrific visuals on my website when working in IE compatibility mode.

Is IE compatibility mode supposed to simulate IE6 and IE7?? Do your websites look as usual in IE compatibility mode? I am currently testing my website with IE8.

Upvotes: 0

Views: 81

Answers (1)

Spudley
Spudley

Reputation: 168655

To give a short answer your question: No, you don't need to worry about compatibility mode.

Long answer: For most users, they will never know nor care about compatibility mode. There are a few reasons why compatibility mode might come into play, but most users won't be using it.

The few reasons you need to be aware of are:

  1. If your site specifically tells IE to use compatibility mode.
  2. If you're viewing the site on your local network (eg localhost, or in a corporate intranet).
  3. If your site has certain specific bugs in the code (though this is more likely to result in quirks mode than compatibility mode).

Compatibility mode is intended for two purposes:

  • Companies who are upgrading but need backward compatibility.
  • Developers who want to test their site on older IE versions.

Most users will never see your site in compatibility mode, but there are a few things that you can do to your site to ensure that it definitely doesn't happen.

  • Put a valid <!DOCTYPE> at the top of your page.
  • Use the X-UA-Compatible meta tag to force IE to use its best mode.

I don't like linking to my own site, but I have written a fairly detailed blog post about IE's various modes and how to ensure that your site is shown in the mode you want. I wouldn't normally post it, but it is relevant here and I think it will be useful for you to read. You can read it here: http://spudley.com/blog/keeping-ie-in-standards-mode

Hope that helps.

Upvotes: 1

Related Questions