Question: I'm sure there is a simple error I'm making, but I am simply alerting `$(window).height()` and it returns the same value as `$(document).height()`.

I am on a 13" MBA and my window height of my browsers when maximised between 780px - 820px (roughly) but each time it returns a window height identical to that of document height. In every case on the site I am working on it is over 1000px.

What is going on here?

```
alert($(window).height());
alert($(document).height()); 

```

Answer: 
Here's a question and answer for this: [Difference between screen.availHeight and window.height()](https://stackoverflow.com/questions/3044230/difference-between-screen-availheight-and-window-height)

Has pics too, so you can actually see the differences. Hope this helps.

Basically, `$(window).height()` give you the maximum height inside of the browser window (viewport), and`$(document).height()` gives you the height of the document inside of the browser. Most of the time, they will be exactly the same, even with scrollbars.
Its really working if we use Doctype on our web page jquery(window) will return the viewport height else it will return the complete document height.

Define the following tag on the top of your web page: 
 `<!DOCTYPE html>`