http://hsivonen.iki.fi/doctype/
The main conclusion to draw from this article is that you should start all your HTML documents (i.e. anything that gets served astext/html
) with <!DOCTYPE html>
as the first thing in the source. (Read on to learn why.)If you want to take extra care to make sure that users of IE8, IE9 or IE10 cannot press a button that makes your site regress as if it was being viewed in IE7, either configure your server to send the HTTP headerX-UA-Compatible: IE=Edge
for text/html
or put <meta http-equiv="X-UA-Compatible" content="IE=Edge">
in thehead
of your HTML documents (before any scripts). This will, however, make the HTML document invalid and if you don’t include these IE-specific incantations, the default behavior of IE is reasonable in most cases, so you don’t really
need to jump through these IE-specific hoops. (Read on for exceptions.)
Rob^_^