Assuming I have a page which content always changes, how can I calculate the height of the whole page included what is scrolled hidden. I tried window.innerHeight
but it only shows me the height of the visible area of the page. How can I how tall is my page from the very top to the very end, assuming I have to scroll in order to see it completely?
Asked
Active
Viewed 20 times
0
-
`document.body.scrollHeight` should be your friend. – fjc Apr 05 '21 at 19:10
-
In particular, see this answer: https://stackoverflow.com/a/44077777/1264804 – isherwood Apr 05 '21 at 19:10