Skip to content

Instantly share code, notes, and snippets.

@dperini
Created September 1, 2009 18:17
Show Gist options
  • Save dperini/179270 to your computer and use it in GitHub Desktop.
Save dperini/179270 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Quirk Mode Test for Safari 2.0.x and other old browsers</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript">
// adapted from http://code.google.com/p/doctype/wiki/ArticleCompatMode
document.compatMode || (document.compatMode =
(function() {
var el; (el = document.createElement('div')).style.width = 1;
return el.style.width == '1px' ? 'BackCompat' : 'CSS1Compat';
})());
document.write('<p>' + document.compatMode + '</p>');
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment