Readium.js caching when doing local development

3 posts / 0 new
Last post

Hello,

I am trying to use readium.js ( through https://github.com/readium/readium-js-viewer ) locally, to develop ePubs. In this way I can leave the ePubs uncompressed which is a win when collaborating through Git and other versioning systems.

Still trying to wrap my head around the readium.js code, but one thing I would like to understand is how it implements caching. Changes in the code don’t show up after a reload, presumably because Readium caches the results. I see it doing a

"HEAD /epub_content/vrouwenkiesrecht/21922/content.opf HTTP/1.1"

It gets a 200 response and apparently decides it doesn’t need to get the HTML

so I tried to `touch content.opf` (changing the modification date),

but that doesn’t work.

Any pointers? Where in the code should I look to understand what is going on?

Thanks!

Eric

The solution I have found for now, is to open readlum-js-viewer in a Chrom(e/ium) Private Browsing Window.
Then, whenever I make a change, I close the window and re-open a new Private Browsing Window.

This appears to work, but I’m still interested in a way to set readium-js cache settings!

Cheers,

In Safari you can empty and disable the cache entirely, once you have activated the "developer" mode (extra item in the menu bar).
In Chrome you can open the developer console, and check the setting that disables caching (as long as the console remains open).
Regards, Daniel

Secondary menu