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?