Frage

i'm trying to disable my website when a user access the site in ie and use the quirks mode, someone know a script in php or javascript that disable or verify this case?

Thanks.

War es hilfreich?

Lösung

You can check document.compatMode and see if it matches "CSS1Compat".

var isQuirky = (document.compatMode !== 'CSS1Compat');
if (isQuirky === true) {
  alert('Your browser is rendering this page in quirks mode, and it may not display properly.');
}

Andere Tipps

You can check it using document.compatMode property

if document.compatMode is CSS1Compat then the mode is standard otherwise it is Quirk

document.compatMode==='CSS1Compat'?'Standards':'Quirks') + ' mode.'
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top