title: height of page in javascript
body: <p>I'm unable to get the height of a page in javascript when the page is larger than the screen.</p>
  
  <p>I thought this would get me the right height:</p>
  
  <pre><code>$(document).height();
  </code></pre>
  
  <p>but that only gets the height of the screen, same as:</p>
  
  <pre><code>$('body').height();
  </code></pre>
  
  <p>same as:</p>
  
  <pre><code>document.offsetHeight;
  </code></pre>
  
  <p>For some reason all these examples only return the height of the screen. Can somebody help?</p>