Did more work on the long reader thing over the weekend, still hopeful someone will be willing to integrate it with the site.
60s demo link: https://youtu.be/ZlDKfR6MQjc
I ran the demo with throttling enabled and cache disabled to best demonstrate its operation. The reader now does three passes on the page rendering, with the last two passes occurring simultaneously (to the extent possible):
- Generate the <img> elements (could be done server-side before page is sent)
- Populate the <img> elements with client-generated placeholder images to prevent reflow when reading
- Load the requested page(s) according to the location fragment
Final page loading now happens in a "bubble" around the requested page#, in the following order:
requested page --> succeeding page(s) --> preceding page(s)
The number of pages it preloads after and before the current page is configurable. For the placeholder images, it uses a hack to get each page's dimensions (E: which is why you see it starting+aborting download of every image), but if it were integrated with the site properly that sort of thing could be cached on the server side and sent with every chapter request. I didn't show it in this demo, but the layout is still compatible with different display resolutions, layouts, etc.
Dynasty admins pls @ me
last edited at Apr 18, 2022 2:47AM