title: Get page height in JS (Cross-Browser)
body: <p>What is the best way to get the actual page (not window) height in JS that is cross-browser compatible?</p>
  
  <p>I've seen a few ways but they all return different values...</p>
  
  <p><code>self.innerHeight</code>
  or
  <code>document.documentElement.clientHeight</code>
  or
  <code>document.body.clientHeight</code>
  or something else?</p>
  
  <p>One way of doing it which seems to work is :</p>
  
  <pre><code>var body = document.body,
      html = document.documentElement;
  
  var height = Math.max( body.scrollHeight, body.offsetHeight, 
                         html.clientHeight, html.scrollHeight, html.offsetHeight );
  </code></pre>