-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Description
We are encountering an issue where the Brotli cached file does not always match the HTML or GZIP cached version of the page. This results in broken layouts, especially missing CSS references from Elementor.
Environment
- WordPress: 6.8.3
- Cache Enabler: 1.8.15
- Elementor: 3.32.3
- PHP: 8.1.33
- Brotli:
- Extension version: 0.5.0
- Library version: 1.0.1
Problem
Sometimes the Brotli version of a cached page is generated incorrectly:
- The Brotli file does not include all CSS links (for example, the Elementor “start-kit” global color file).
- The HTML and GZIP cache versions do include the correct CSS references.
- As a result, the site looks broken when the Brotli version is served.
Workarounds
- Deleting the incorrect Brotli cache file forces regeneration, which fixes the problem.
- Disabling the Brotli extension avoids the issue (since the Brotli file is not used).
Steps to Reproduce
- Enable Brotli compression with Cache Enabler.
- Visit a page so that HTML, GZIP, and Brotli cache files are generated.
- Inspect the generated files:
- Compare Brotli vs. HTML/GZIP versions.
- In some cases, Brotli misses specific CSS references.
- When the incorrect Brotli file is deleted, it regenerates correctly.
Expected behavior
Brotli, GZIP, and HTML cache files should always contain identical page content.
Actual behavior
Brotli cache occasionally contains incomplete page content (e.g., missing CSS links), causing broken styling.
Attachments
- cache.zip
- Original generated cache files (HTML, GZIP, Brotli).
- Unzipped versions for easier comparison.
- Regenerated Brotli file (shows corrected content).
Impact and request
We manage ~158 websites using Cache Enabler. When clients report broken layouts, we have to manually clear caches to resolve it. This is not sustainable at scale.
Could you please investigate why Brotli cache generation sometimes diverges from HTML/GZIP content?
We are happy to provide additional debugging info if needed.
With kind regards,
ComSi Websupport