Pre-compressed gzip cache variant #15

Open
opened 2026-09-13 11:58:43 +00:00 by kevin.bataille · 0 comments
Owner

Cached HTML compresses extremely well, but the drop-in currently serves raw bytes via readfile(), leaving compression to the web server (or none).

Spec:

  • On cache write, also store a gzencoded sibling (index.html.gz or index-gzip.html)
  • On serve (drop-in + in-WP path), when the client sends Accept-Encoding: gzip, serve the compressed variant with Content-Encoding: gzip and correct Vary header
  • If rewrite-rule static serving (#11) lands, express this via standard MultiViews/mod_rewrite gzip rules instead
Cached HTML compresses extremely well, but the drop-in currently serves raw bytes via readfile(), leaving compression to the web server (or none). **Spec:** - On cache write, also store a gzencoded sibling (index.html.gz or index-gzip.html) - On serve (drop-in + in-WP path), when the client sends Accept-Encoding: gzip, serve the compressed variant with Content-Encoding: gzip and correct Vary header - If rewrite-rule static serving (#11) lands, express this via standard MultiViews/mod_rewrite gzip rules instead
kevin.bataille added the phase-1 label 2026-09-13 11:58:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kevin.bataille/wp-recache#15