-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefetch & Prerender #21
Comments
In Readium-1 cloud reader, EPUB HTML / SVG content documents are loaded into iframes via BlobURI (or the IE / Edge fallback using document.write()), due to preprocessing requirements. So In Readium-1 Chrome app, |
Thanks @danielweck, in the meantime I've also been exploring a bit online. Here are a few useful resources:
Here are a few mental notes so far:
In terms of speed improvements, this should be the most effective:
Overall though, I don't see any good reason not to implement rel="prerender" in the streamer. In Safari and Firefox, we'll be limited to rel="prefetch" which won't be as useful but could still speed things up a little. |
Additional food for thoughts: |
Just pushed a branch with a readium-shared-js plugin to experiment with this in Readium 1. https://github.com/readium/readium-shared-js/tree/feature/preload_experiment It works best when using the useSimpleLoader flag set to true. My testing workflow uses Chrome, Wireshark, Chrome Dev Tools and the Chrome Task Manager (thanks Hadrien for the tip) @HadrienGardeur |
I should clarify that it does support two by two spreads (a bit hacky, look at the debounce) but it only does a prefetch/prerender for the next spine item (the one half of the next two page spread) |
Thanks @jccr I might actually add support for prefetch and prerender in my prototypes since one of them uses an iframe and the other is purely based on progressive enhancements. |
I've added references to prefetch/prerender in both streamer and pagination modules. |
An article of interest on the subject: |
Yeah we also found that article while working on preload/prefetch/prerender in Go and it's quite interesting. |
The NodeJS implementation supports the same as Go (HTTP header |
During our last conference call, I mentioned that several browser engines support rel="prerender": http://caniuse.com/#feat=link-rel-prerender
This is fairly widely implemented on the Web too, for instance Google includes rel="prerender" on the first result of a search if it's confident enough about it. In Chrome, this creates a separate process that prerenders the document and replaces the current tab once you follow the link.
This could be a good strategy on Android (Chomeview) and on desktop (Electron with Chromium or Edge), but won't work on iOS where we might instead rely on multiple webviews.
Has anyone tested rel="prerender" either with a prototype or with Readium-1? I'd like to figure out if this is an option for us, or if the audio/video/script issues that have been mentioned before would make this difficult to use.
cc @danielweck @rkwright
The text was updated successfully, but these errors were encountered: