The server does the "encoding", but the contents are stored on the local device (among other things, this method provides offline access almost "for free"). Think of it just like a proxy with a filter.
Since I have complete control over the HTML which is displayed in the devices, I can store the position where the reader is at just by recording an offset in the HTML code and doing some calculations with it.