title: HTML/DOM: What is standards equivalent of document.body.scrollHeight?
body: <p>For nearly a decade i've been using:</p>
  
  <pre><code>document.body.scrollHeight 
  </code></pre>
  
  <p>to return the "<em>ideal</em>" height of the browser window. This worked fine when i was <em>forcing</em> Internet Explorer into <strong><em>quirks mode</em></strong>, by using a quirks-mode doctype:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  </code></pre>
  
  <p>Now i want to opt into <strong><em>standards mode</em></strong>, except <a href="http://www.ozzu.com/website-design-forum/using-doctype-invalidates-client-height-t100424.html" rel="nofollow">the meaning of <code>scrollHeight</code> has changed</a>:</p>
  
  <ul>
  <li><strong>Quirks Mode</strong>: <code>document.body.scrollHeight</code> = the height of the document</li>
  <li><strong>Standards Mode</strong>: <code>document.body.scrollHeight</code> = the height of the <code>&lt;body&gt;</code> element</li>
  </ul>
  
  <p>What is the standards mode equivalent of <code>document.body.scrollHeight</code>?</p>
  
  <h2>See also</h2>
  
  <ul>
  <li>quirksmode.org: <a href="http://www.quirksmode.org/dom/w3c_cssom.html#t36" rel="nofollow">W3C DOM Compatibility - CSS Object Model View - ElementView properties</a></li>
  <li><a href="http://www.ozzu.com/website-design-forum/using-doctype-invalidates-client-height-t100424.html" rel="nofollow">Using !DOCTYPE invalidates client height</a></li>
  </ul>