Reputation: 6252
I'm trying to print a message to the user when he is using an IE version bellow IE8. To test it I enabled the Document Mode 8. But when I ask for the Document Mode in javascript I always receive the 'quirk mode: 5'
document.documentMode;
Does anyone know why?
Here is the beginning of my specification:
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
...
SOLVED:
I used the user-agent nevertheless and checked for the 'trident/4.0' tag which is displayed only in IE8
Upvotes: 0
Views: 362
Reputation: 3788
There are a couple of things that can force IE into QuirksMode the most obvious two are
Upvotes: 1
Reputation: 2051
Use this meta tag in your page head section...
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
It'll finalized your document mode.
Upvotes: 0