Verify Brotli or Gzip delivery
Compression is proven by the public HTTP response, not by files in the POM Cache directory. Test at least one eligible HTML page and one eligible text asset through the same CDN behavior.
Inspect in a browser
- Open a private browser window.
- Open developer tools and select Network.
- Disable the browser cache for the diagnostic request.
- Load the public HTTPS page.
- Select the main document.
- Inspect Response Headers.
Look for:
Content-Encoding: br
or:
Content-Encoding: gzip
Compare Transferred size with the decoded/resource size. The transferred value should normally be smaller for compressible content.
HTTP/2 or HTTP/3 in the protocol column does not prove body compression. Transport protocol and Content-Encoding are different.
Compare explicit request encodings
Use an approved public test URL:
curl -sS -D - -o /dev/null \
-H 'Accept-Encoding: br,gzip' \
'https://example.com/about/'
Then request identity:
curl -sS -D - -o /dev/null \
-H 'Accept-Encoding: identity' \
'https://example.com/about/'
The first response may use br or gzip. The identity request should not claim an encoding that the client excluded.
Use --compressed when downloading and decoding a compressed body with curl. Without it, curl can save the encoded bytes exactly as transferred.
Confirm the layer
Record:
Content-Encoding;Content-Type;Content-Lengthwhen present;- CDN hit/miss and age evidence;
Vary;- POM Cache’s PHP hit header, if the request reached that origin path.
A CloudFront hit with Content-Encoding: br shows an edge-compressed or edge-cached Brotli response. A POM Cache phase=early header only describes the origin page source.
The CDN cache policy is authoritative for compression variants. Do not assume that seeing Vary: Accept-Encoding alone proves the edge key is correct.
Warm and retest
Run the compatible request more than once:
- invalidate only the test path if an older object may exist;
- observe the initial edge refill;
- repeat until a cache hit is reported;
- confirm the hit retains the correct encoding;
- test a different viewer encoding preference.
This catches a policy that compresses the miss but stores or reuses variants incorrectly.
Why a response may remain uncompressed
For CloudFront, check:
- Compress objects automatically is enabled on the matching behavior;
- the cache policy enables the desired compression formats;
- the viewer sent
brorgzip; - the origin supplied a supported
Content-Type; Content-Lengthis valid;- the object is within CloudFront’s automatic-compression size range;
- the status and response body qualify;
- an older identity object is not still cached;
- the origin did not already send a
Content-Encoding.
CloudFront documents these conditions in Serve compressed files.
Do not expect every resource to shrink
JPEG, PNG, WebP, video, ZIP, and other already-compressed formats may not qualify or benefit. Focus Brotli/Gzip verification on HTML, CSS, JavaScript, JSON, SVG, and other supported text-oriented types.
If origin and edge disagree, use Distinguish the origin cache from the CDN cache before changing POM Cache.