diff --git a/static/js/app.js b/static/js/app.js index f0a0c31..5068fff 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2731,6 +2731,10 @@ async function _setCachedBook(bookId, data_ct, data_iv) { tx.oncomplete = resolve; tx.onerror = resolve; }); + // Request persistent storage so the browser doesn't evict cached books + // under storage pressure. Chrome grants this silently for installed PWAs; + // Firefox may show a permission prompt. + if (navigator.storage?.persist) navigator.storage.persist(); } catch {} }