We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

document.compatMode Redirect 1

« DOM Reference


Indicates whether the document is rendered in Quirks mode or Strict mode.


mode = document.compatMode 
  • mode is the string "BackCompat" for Quirks mode or "CSS1Compat" for Strict mode.


if (document.compatMode == "BackCompat") {
  // in Quirks mode


There is a third mode, Gecko's "Almost Standards" Mode, which only differs from Strict mode in the layout of images inside table cells. This third mode is reported the same way as Strict mode: "CSS1Compat".


Document Tags and Contributors

Last updated by: Sheppy,