Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
When user change the document mode of IE11 browser to 8.
In my index.aspx page I want to forcibly set the browser document mode to max value.
but below solution not working properly for me
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
Posted
Updated 7-Jul-15 9:37am
v2
Comments
Sergey Alexandrovich Kryukov 7-Jul-15 15:28pm    
You are talking about your HTML. It should work with all major browsers, not just IE. Chasing all IE defects is pointless. Better make your HTML design simpler and less sensitive to all those IE freaky peculiarities.
—SA
Venkata Durga Rao 7-Jul-15 15:39pm    
If users browser version is IE11 but he opens my site in document mode 8 jquery is not working properly,for to overcome that issue i using that meta tag but there is no result
Sergey Alexandrovich Kryukov 7-Jul-15 16:22pm    
Better don't do it.
—SA
Afzaal Ahmad Zeeshan 7-Jul-15 16:30pm    
He cannot. Browser doesn't provide any details whether it was by request changed to IE 8 or whether it is actually IE 8.

The only solution is to let user know that he should use IE 11 or above (IE Edge) to use the website (server-side code would help to detect the user-agent), otherwise he cannot. I don't think a good web developer would do so. Most of the users (that actually pay for stuff) use IE 9 or IE 10. IE 8 is not used too much now. Please see Solution 1.
Sergey Alexandrovich Kryukov 7-Jul-15 16:39pm    
Sure. See also Solution 2.
—SA

You cannot do so. Because has himself changed the state of browser. Let me tell you, a user would never do that. Only if he is a developer or a hacker; cracker if in negative sense. Then he would try to play around with developer tools.

My younger brother doesn't even know that he can change IE document mode from Edge (latest version, not the new browser Edge) to IE 8 or 7 or 6. My father don't even know there is such a feature; developer tools. My grandfather doesn't even know if there is an IE. So, it depends on the users.

If he wants to open a document in IE 8 mode, he can. You cannot change that. Because browser doesn't tell website whether user is changing the document mode, or whether it is the actual browser with 8th version (of IE). Also, what makes you so sure that user, if still in IE 11, cannot remove jQuery itself? Or what if he doesn't even allow your website to send a request to download the library. There are many things.

Also, read the first comment to your question: Make designs to your website in order to provide a same functionality. Or simply, tell the user to use IE 11; worst UX technique. To handle browsers that do not support a feature, you should try using Modernizr[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 7-Jul-15 16:38pm    
Good points, a 5. And I added Solution 2 referencing my old answers.
—SA
Afzaal Ahmad Zeeshan 7-Jul-15 18:19pm    
Thank you, Sergey.
In addition to Solution 1: please read my advice on browser compatibility:
webpages layout change when running in different browsers.[^],
How Do I Convert Desktop Site Into Mobile Site[^].

Main idea here is: you cannot chase all those browser peculiarities, especially with IE. The really best way is to develop Web design and layouts to make it not so sensitive to those peculiarities, which is achieved through reasonable simplicity. Believe me: nobody want's to see "cool" sophisticated tricks; people want good readability, useful interesting content and clear navigation.

—SA
 
Share this answer
 
Comments
Afzaal Ahmad Zeeshan 7-Jul-15 18:18pm    
5ed.
Sergey Alexandrovich Kryukov 7-Jul-15 18:28pm    
Thank you, Afzaal.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900