I am trying to get total height of webpage using javascript as follows
var pageHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;
works fine for me in other browsers but Internet explorer returns a value '0' for it. why?
This should work in all browsers :
Don't forget to execute the code after the document is loaded.
EDIT : I let this in hope it works but I have no way to test it in all browsers and I'm not 100% sure. It's adapted from jQuery's source.