
A deployment is complete, origin logs show 304 responses, and the CDN reports successful revalidation. Visitors still receive the old file. To explain this, identify which representation the origin validated and which stored response the CDN reused.
A 304 Not Modified response does not supply a new representation body. When it applies to a stored response, a cache updates the relevant metadata under HTTP caching rules and reuses the stored body. If the origin incorrectly accepts an old validator after content changes, revalidation can keep that old body in use. Browser caches and service workers can also retain older content, so an origin-side 304 alone does not identify the faulty layer.
Locate the conditional request in the delivery chain
The browser can send a conditional request to the CDN, and the CDN can independently send one to the origin. Their response codes need not match. After receiving a 304 from the origin, the CDN may serve its stored body as a 200 response to a client making an unconditional request. A browser receiving a 304 can instead reuse its own stored response.
Capture an affected request's timestamp, complete URL, status, ETag, Last-Modified, Cache-Control, Age when present, and provider-specific cache status or request ID. Correlate this with origin logs, including If-None-Match, If-Modified-Since, and the backend that handled the request. If these fields are missing, add narrowly scoped diagnostic logging without recording cookies or authorization credentials.
Disabling the browser cache in developer tools does not establish that the CDN was bypassed. CDN handling of client cache directives varies; confirm any origin fetch through logs rather than assuming it occurred.
Check whether validators change with the representation
An ETag identifies a selected representation according to the origin's validator scheme. A strong validator must change when representation data changes. A weak validator can describe semantic equivalence and cannot establish byte-for-byte identity.
Check for these failure patterns:
Different response bodies share the same strong ETag.
A deployment leaves different versions on different origins.
File replacement preserves an inappropriate modification time.
Multiple updates within one second cannot be distinguished by the modification-time validator.
Language, compression, or tenant variants are incorrectly combined into one cache entry.
A reverse proxy's validator generation conflicts with application behavior or downstream response transformations.
For GET and HEAD, If-None-Match uses weak comparison. When If-None-Match is present, a recipient must ignore If-Modified-Since. Sending both headers does not require the origin to independently pass both checks. RFC 9110 Section 13 defines the full precondition evaluation order.
Save a response, then test its validator
This Linux shell example reads one small public asset. Replace the example hostname and path, and keep the URL, compression options, and test network consistent. These commands are illustrative and have not been run against your production service.
url='https://cdn.example.com/assets/app.js' curl -sS --compressed --max-time 15 \ -D first.headers -o first.body "$url" # Copy the full observed ETag, including quotes and any W/ prefix. curl -sS --compressed --max-time 15 \ -H 'If-None-Match: "replace-with-observed-etag"' \ -D conditional.headers -o conditional.body "$url" sha256sum first.body grep -Ei '^(HTTP/|etag:|last-modified:|age:|cache-control:|vary:)' \ first.headers conditional.headers
If the second response is 304, it provides no new resource body to hash as the deployed version. Compare the first saved body with the expected deployment artifact and the current origin representation. curl does not automatically combine a 304 with a browser-style local cache entry.
To test whether an old validator stops matching after deployment, retain the pre-deployment body and ETag, then repeat the conditional request after the deployment has converged. Inventing an arbitrary ETag and receiving 200 only shows that the invented value did not match.
The --compressed option requests a supported content encoding and decodes the saved body. Compare hashes of equivalent decoded representations; do not compare compressed wire bytes with an uncompressed deployment artifact without accounting for encoding.
Compare each authorized origin directly
Where direct-origin testing is permitted, curl's --resolve option can map a URL hostname to a selected origin IP while preserving the hostname used for Host and TLS SNI. The address below is reserved for documentation and must be replaced with an authorized test target.
curl -sS --compressed --max-time 15 \ --resolve cdn.example.com:443:192.0.2.10 \ -D origin-a.headers -o origin-a.body \ 'https://cdn.example.com/assets/app.js' sha256sum origin-a.body
Adjust the test if the real origin connection uses a different hostname, required headers, mutual TLS, or a private gateway. Keep certificate validation enabled. If origin allow-listing prevents direct access, use the existing operational access path rather than expanding public access for a test.
For each origin, compare the decoded body hash, ETag, and deployment version. Different bodies carrying the same strong ETag indicate an invalid validator scheme. Different deployment versions require deployment convergence before cache invalidation can produce reliable results. Otherwise, the next cache fill may fetch an older version again.
Repair the cause before invalidating affected entries
If the application incorrectly recognizes an old validator, fix precondition evaluation and validator generation. For multiple representations, review the cache key, Vary behavior, and the CDN's supported header policies. Do not combine personalized or tenant-specific responses merely to improve hit ratio.
Use content-fingerprinted filenames for static JavaScript and CSS where practical. Make new assets available on all relevant origins before changing HTML references. Give HTML its own freshness and revalidation policy, and retain old assets for the required rollback and cache transition window.
After fixing the origin, invalidate affected URLs within the provider's supported scope and retain the task ID and completion evidence. If the browser cache or a service worker still holds the old response, address that update path separately. A blanket purge can increase origin load without fixing inconsistent deployments or validators.
Verify with pre-deployment and post-deployment evidence
Keep the old body, old ETag, deployment time, and expected new body hash. After a deployment that changes the selected representation, test the old validator. When that condition no longer matches, the server should return the appropriate new response rather than incorrectly validating the old body. Then test the new validator against the unchanged new representation to confirm that conditional requests still work.
Finally, inspect the actual response body from representative user networks and correlate browser, edge, and origin behavior. Age, HIT, 200, and 304 each describe part of the exchange; none independently proves that the visitor received the correct version. Acceptance should include the expected body, consistent origin versions, and acceptable origin load.
References
These references describe general HTTP behavior. Verify cache-key rules, validator transformations, and invalidation coverage against the deployed CDN configuration and provider documentation.