check-gatsby-caching icon indicating copy to clipboard operation
check-gatsby-caching copied to clipboard

Tool say header cache control is not preset, but curl says different

Open persocon opened this issue 4 years ago • 0 comments

tool says:

npx check-gatsby-caching https://[redacted] 
npx: installed 230 in 7.786s
Validating headers for the Gatsby site: https://[redacted]


HTML
https://[redacted]
✅ headers are correct!


app-data.json
https://[redacted]/page-data/app-data.json
❌

- Expected
+ Received

  Object {
-   "max-age": 0,
-   "must-revalidate": true,
-   "public": true,
+   "null": "No cache-control header set",
  }


Page Data
https://[redacted]/page-data/index/page-data.json
❌

- Expected
+ Received

  Object {
-   "max-age": 0,
-   "must-revalidate": true,
-   "public": true,
+   "null": "No cache-control header set",
  }


JavaScript and CSS
https://[redacted]/webpack-runtime-d068a770423a88d3d9a5.js
✅ headers are correct!

curl says:

curl -I https://[redacted]/page-data/app-data.json
HTTP/2 200 
date: Mon, 08 Feb 2021 12:09:52 GMT
content-type: application/json
content-length: 50
server: openresty
last-modified: Mon, 08 Feb 2021 11:14:50 GMT
etag: "0c453a4621603397e69b7cd0b78c37a8"
cache-control: public, max-age=0, must-revalidate
accept-ranges: bytes
x-robots-tag: noindex, nofollow
x-cache-status: MISS

which one is correct? :/ does the tool cache something?

persocon avatar Feb 08 '21 12:02 persocon