I am having problem of getting wrong height with
$(window).height();
and got the similar question here
In my case when I try
$(document).height:if your device height was bigger. Your page has Not any scroll;
$(document).height:
height
$(document).height: assume you have not scroll and return this height;
$(window).height: return your page height on your device.
$(window).height: