Revalidated policy contains new response headers even if not modified
See original GitHub issueORIGINAL POLICY {
'content-type': 'application/json',
'last-modified': 'Wed, 27 Nov 2019 01:56:57 GMT',
'content-encoding': 'gzip',
age: '449457',
date: 'Sun, 08 Dec 2019 14:21:24 GMT',
warning: '113 - "rfc7234 5.5.4"'
}
REVALIDATED POLICY modified=false {
age: '449457',
date: 'Sun, 08 Dec 2019 14:21:24 GMT'
}
I just placed
console.log('ORIGINAL POLICY', CachePolicy.fromObject(revalidate.cachePolicy).responseHeaders());
console.log('REVALIDATED POLICY', `modified=${revalidatedPolicy.modified}`, revalidatedPolicy.policy.responseHeaders());
after this line:
I will include some reproducible code soon.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Cache-Control - HTTP - MDN Web Docs
The proxy-revalidate response directive is the equivalent of must-revalidate , but specifically for shared caches only. no-store. The no-store ...
Read more >Chrome doesn't send "If-Modified-Since" - Stack Overflow
"The rule is actually quite simple: any error with the certificate means the page will not be cached." https://code.google.com/p/chromium/issues ...
Read more >Custom Cache-Control response header for `/_next/image`
I'm getting this Response header: Cache-Control: public, ... <img> tag it's actually changed, whereas for new <Image> component it is not.
Read more >Introducing Smart Edge Revalidation - The Cloudflare Blog
Revalidation checks occur when a browser sends a request to a cache server using If-Modified-Since or If-None-Match headers. These request ...
Read more >Staleness and revalidation - Fastly Developer Hub
The HTTP Cache-Control header directives stale-while-revalidate and stale-if-error (which trigger scenarios 1 and 2 above) are HTTP standards defined in RFC ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have done more digging. The second response doesn’t include any validation header so this is correct behavior.
However,
content-type
is missing, and that probably needs fixing.