How to tell if a browser is in “quirks” mode?

In Firefox and Opera you can determine if your browser is in “quirks mode” by checking page info.

Using document.compatMode, will tell you the mode you are in with most browsers.

In Chrome, Safari, and IE, run this javascript in the address bar:

 javascript:window.alert('You are in ' + (document.compatMode==='CSS1Compat'?'Standards':'Quirks') + ' mode.')

(note that you’ll need to re-type the javascript: portion after pasting into your address bar, due to recent security changes)

Leave a Comment