Does Internet Explorer 11 still have quirks mode?
Asked Answered
U

2

12

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.

Uniaxial answered 3/9, 2013 at 11:1 Comment(0)
F
15

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.

Famished answered 3/9, 2013 at 12:27 Comment(4)
There is a large number of CSS differences between standards and quirks mode, and there is no overall documentation of them. I would thus not say that the move is “remarkably easy”; rather the opposite.Gulledge
Great explanation! However, I agree to the above comment - there are lots of changes to be done when moving from quirks mode to standards mode. Eg: in quirks mode specifying border-style:solid and border-width: 0010 would put a line at the bottom but in standards mode this puts a border all 4 sides. Also, in quirks mode when you specify width on the html element inside style, the width should have px appended to it in standards mode else it does not recognize it.Serviceman
I think you need to update this answer to 'no'. I remember the days when you could find the 'quirks mode' in the developer tools window, but I can't find it anymore. I can't find the other modes either.Caller
@TomMcDonald - quirks mode is still listed in IE11 dev tools, but is referred to simply as "5" in the list of IE versions that can be emulated. However, it is only in IE11; it is not present in the Edge browser that replaces IE, so if you're using that, you won't see any reference to quirks mode, nor indeed to any other emulation mode for old IE version.Famished
B
4

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!!!

Bernat answered 21/11, 2013 at 23:12 Comment(1)
Thanks for this answer! It helped me to fix a problem where the HTML page that I was trying to load in a web browser control wouldn't load correctly. Apparently, it must have been because the HTML 5 document was not correctly interpreted by the instance of IE that the web browser control was using internally. Adding the following helped: <meta http-equiv="X-UA-Compatible" content="IE=9">Indoxyl

© 2022 - 2024 — McMap. All rights reserved.