Is quirks mode relevant in 2011?

一笑奈何 提交于 2019-12-04 03:09:07

问题


With all the latest browsers like IE9, FF4, ever updating chrome, etc., do we still need quirks mode?

If yes where is it useful? In which scenario?


回答1:


No. You should never use quirks mode. It ceased to be of any relevance once IE 5.0 and 5.5 stopped being used.

Those were the last browsers which did not support standards mode, so any sites which needed to include support for them would have needed to be able to work in quirks mode.

However, IE6 along with all versions of all browsers released since then supports standards mode.

Some of them still carry legacy support for quirks mode, but you shouldn't allow them to use it. (it's triggered if you neglect to include a <!DOCTYPE> at the top of your HTML code, which is why you shold always declare a doctype)

In the unlikely event that you need to support IE5, then use quirks mode. Otherwise, avoid at all costs.

If you are maintaining code that uses quirks mode then you should take the time to convert to use standards mode.

If it's a public-facing website, then using quirks mode now should not even be contemplated, as it will look hideous in a lot of modern browsers. Even if it's in a corporate environment then you I would strongly reccommend converting it to standards mode, as even IE6 users will benefit from that (if nothing else, it'll make their eventual upgrade to a newer browser less painful). The only time you won't be able to use standards mode that is if you have a client who is still stuck with IE5. But if you've got that, then you should have run away screaming already.




回答2:


Quirks mode is designed to allow (much) older websites to work in (comparatively) newer browsers.

New development should never be done in Quirks Mode, but Quirks Mode will stick around as long as there are still old un-updated websites that require it (ie, forever).




回答3:


Quirks mode is definitely still needed in corporate environments where legacy applications are very common. That old 1998 webapp still works and we don't have money to replace it so it has to keep working.



来源:https://stackoverflow.com/questions/6404635/is-quirks-mode-relevant-in-2011

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!