Free
Performance and cache plugins
Keep pages fast with lazy loading, and make sure optimisation plugins never break the viewer.
What loads, and when#
- Foliora's scripts load only on pages that contain a viewer.
- PDF.js 3.11.174 is bundled — no CDN request, no DNS lookup to another host.
- With lazy loading, a viewer starts only when it is about to scroll into view. Turn it on site-wide in Settings → Viewer defaults or per embed with
loading="lazy". - Only the visible page (or spread) is drawn; scroll view draws the pages near the screen.
Cache and optimisation plugins#
Minifying, combining or delaying PDF.js breaks it. Foliora excludes its scripts automatically in:
WP Rocket
W3 Total Cache
Autoptimize
LiteSpeed Cache
SiteGround Optimizer
The script tags are also marked data-no-optimize. If another optimiser still bundles them, add these to its exclusion list:
foliora-viewer.js
pdf.min.js
pdf.worker.min.js
Large files#
- The PDF is downloaded once per visit (then served from the browser cache). Compress large PDFs — “Reduce file size” in Acrobat, or export with web-optimised settings.
- Split very long documents into chapters and link them.
- Images inside the PDF are the usual cause of size; 150 dpi is plenty for screens.
Pages that show a Secure Mode document send DONOTCACHEPAGE, because their signed links are personal and expire. Other pages cache normally.