I wish to achieve content load when the user scrolls to the bottom of the page.
I am having a problem. It works fine on desktop browsers but not on mobile. I have imple
Bullet proof way to get document height on all browsers:
function getDocumentHeight() {
return Math.max(
Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
Math.max(document.body.clientHeight, document.documentElement.clientHeight)
);
}