开发者

A new Rails 3 project, but should HTML 4.01 Strict and Compatibility of IE 7 mode be used?

开发者 https://www.devze.com 2023-02-19 22:39 出处:网络
After starting a new Rails 3.0.5 project, I am surprised a little to find that the DOCTYPE it uses is html 5

After starting a new Rails 3.0.5 project, I am surprised a little to find that the DOCTYPE it uses is html 5

<!DOCTYPE html>

I am guessing it won't choke IE 6 or IE 7 and render the HTML in quirks mode, as IE 6 may not have knowledge of what this DOCTYPE is.

Also, even now that IE 9 is released, I think to make it easy to develop and test for IE, it probably is wise to set the Compatibility Mode for IE 7 on our application layout:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

so that IE 7, 8, and 9 behave all the same, and we don't need to develop and test on each of IE 7, 8, and 9... as of right now, IE 7 still has about 8.5% market share, so probably can't set the Compatibility Mode of IE 8 instead?

The following quoted from Wikipedia for IE: 开发者_如何学JAVA(IE 6 still 12%... holy cow...)

A new Rails 3 project, but should HTML 4.01 Strict and Compatibility of IE 7 mode be used?


I have built a few rails apps that declare HTML5 doctypes, and haven't seen any problems with IE 6/7/8 as a result. I certainly see the typical IE JavaScript problems, but no unusual rendering issues.

You can always test with http://browsershots.org/ or the Adobe BrowserLab.

0

精彩评论

暂无评论...
验证码 换一张
取 消