最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Force Internet Explorer 10 Document Mode - Stack Overflow

programmeradmin0浏览0评论

Basically I have been going through a problem and would like to enforce my browser to be used under Browser Mode: IE 10 Compatable View and Document Mode: Quirks.

As in IE 10 Document Mode is IE 5 Quirks and only Quirks but, I am unable to enforce it by using document mode and meta-tag too.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   ".dtd">
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>

This is what I have been trying but no luck.

Basically I have been going through a problem and would like to enforce my browser to be used under Browser Mode: IE 10 Compatable View and Document Mode: Quirks.

As in IE 10 Document Mode is IE 5 Quirks and only Quirks but, I am unable to enforce it by using document mode and meta-tag too.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>

This is what I have been trying but no luck.

Share Improve this question asked Sep 24, 2013 at 13:35 Wasif KirmaniWasif Kirmani 1,3315 gold badges23 silver badges44 bronze badges 5
  • 2 Not clear what you're trying to do here.... you say you want quirks mode???? Why on earth would you want that? – Spudley Commented Sep 24, 2013 at 13:44
  • Please go through this post, might be helpful for you: stackoverflow./questions/15838605/… – Mayank Sharma Commented Sep 24, 2013 at 13:44
  • Basically the application is too old on which I am working and can't change to much code to setup the UI but i have testing it by changing the browser mode and document mode and it's seems perfect on IE Compatibility View with Quirks – Wasif Kirmani Commented Sep 24, 2013 at 13:49
  • I suggest using standards mode, and having * {box-sizing:border-box;} in your CSS. This will fix most layout issues and avoid having to use quirks mode. – Spudley Commented Sep 24, 2013 at 13:53
  • IE=EDGE means "Use IE10 Standards mode". You want IE=EmulateIE7 which means "Use Compatibility view, and use Quirks mode if the document isn't in standards mode." – EricLaw Commented Sep 24, 2013 at 19:07
Add a ment  | 

1 Answer 1

Reset to default 3

You can try this, if the browser it IE10 the rendering machine will be changed to latest one.

!--  Force IE to use the latest version of its rendering engine -->  
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

chrome=1 means IE should use the Chrome rendering engine if installed

I think changing document type Quirks seems a bad idea, however if you need then you may have to remove the !DOCTYPE.

If none of these rules apply, the declaration determines whether the webpage renders in a standards mode, Almost Standards mode, or quirks mode.

Reference: http://msdn.microsoft./en-us/library/ff405803(v=vs.85).aspx

发布评论

评论列表(0)

  1. 暂无评论