I've got a webpage for reading books online. I'd like to save the position inside the document so when a user resumes his reading, he starts in the point where he previously was.
I can get the scroll using things like window.pageYOffset, but this depends on the browser window size. In other words, if you make your window narrower, the same text will be at a different scroll (see the image for an example).
So I need to come up with a window-size independent way of measuring scroll. Any ideas?
Note: I only need this to work on mozilla based browsers.
Thanks in advance