From The Blog

How to know the mode the browser running with ?

7 April 2013, in HTMLJavascript

How to know the mode the browser running with ? i.e. Standards Mode, 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)



Post a Comment