Does Internet Explorer 11 still have quirks mode?

26.2k Views Asked by At

Does Internet Explorer 11 still have quirks mode available? We use a very old system which relies on the quirks mode.

I know it's a very old and vulnerable environment but I'm just wondering if it will stay working.

2

There are 2 best solutions below

4
On

Yes it does.

IE11 has all the same backward-compatibility modes as IE10 did (plus an IE10-compat mode of course).

In fact, in common with IE10, there are actually two quirks mode which are very slightly different from each other. ("Quirks mode" and "IE5 Quirks mode"). But for most purposes you don't really need to know that; it'll default to the original Quirks mode in the absence of a doctype, just the same as previous IE versions.

So the short answer to your question is "Yes, you're fine; it's still there and your page will still work just as well in IE11 as it did in IE10."

However, IE's engineers are trying to discourage the use of these modes.

The main way they've done this is by hiding them in the dev tools panel -- the browser mode option is visible, but you only ever have at most two options: the mode that the page was loaded in, and the "Edge" mode for IE11 standards mode. If the page was loaded in standards mode, then you'll only ever see the "Edge" option.

This means that yes, you can load a page in quirks mode, if it is written that way, but if you load a page in standards mode, you won't be able to see the option to put that page back into quirks mode.

One thing to note is that if you're using certain other old features such as ActiveX controls embedded in the page, you may have issues with the browser's security model. This hasn't changed much between IE10 and IE11, so if your page works in IE10 then you should be fine, but if you're upgrading from IE9 to IE11, you may find some things break. There are ways to re-enable it, but it can be a bit ugly.

I would also point out that from a pure CSS perspective, converting from quirks mode to standards mode is actually remarkably easy. Most of the layout glitches caused by the switch are a result of the change in the box model, but standards mode can be set to use the same quirks mode box model simply by adding *{box-sizing:border-box;} to your CSS.

If layout is the main issue, you should consider giving that a try, because you may find that you don't actually need quirks mode afer all.

1
On

I'm only sorry for not to see your question before, but of course there is. You need to change it in your HTML code through X-UA-Compatible HTTP-equivalent header.

So, for example, if you want to emulate Internet Explorer 8.0, in the head section insert:

<!DOCTYPE html>
  <html>
    <head>
      <meta http-equiv="X-UA-Compatible" content="IE=8">
        ...

Even the JavaScript navigator.userAgent changes not to break your scripts which rely on the browser version.

navigator.userAgent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C)

Just it! Bye.. and the best results to your developments!!!