Closed coler-j closed 5 years ago
You are right, the web/cloud reader URLs are "heavy" (query params: epub
to reference the publication, goto
to reference a location within the publication, and optionally epubs
to reference the originating content library / OPDS feed). The percent-encoded goto
JSON + CFI syntax is indeed downright ugly.
On the plus side, users can copy/paste links from the address bar to exchange direct deep publication links.
For reference, here is the code where window.history.replaceState()
is used to preserve the current goto
CFI each time the user accesses a different location within the publication ("page turn", or table of content linking):
Also see this central piece of code where the URL query params are used to "transport" state for the library and reader views: https://github.com/readium/readium-js-viewer/blob/develop/src/js/ReadiumViewer.js
This issue is a Question
Question: I am used to the world of Django where most URLs look well formed and not 'ugly'. The inclusion of the CFI in the address bar looks like a bunch of nonsense and is not 'pretty'. As well as the URL parameter of the ebook that is loaded.
Is there anyway to not add the parameters as querystring arguments? (If I have the ability to pass the URL via server side HTML rendering) ...
And why can't the CFI be kept in a cookie instead of the querystring?
Expected Behaviour
No expected behavior.
Observed behaviour
Readium-js-view adds the epub CFI in the address bar as a querystring
Steps to reproduce
Product