is browser caching working?
-
I’ve been using W3TC for about a month and a half now, testing at GT Metrix and tweaking the plugin to get the best results.
One thing I’m confused about is that GT Metrix keeps giving me a big fat zero for browser caching–the report says “expiration not specified.” But when I check a specific file in the Network tab of Chrome Developer Tools, I can see both “cache-control: max-age=2592000” and “expires: access plus 30 days” in the response headers. Also seeing a 304 code, which means my browser is successfully caching the file, right?
Is this just a bug in GT Metrix? Or do I have something misconfigured? How do I ensure visitors to site are caching these files?
Thanks. I’ll paste the full header info. for one image file in case that’s helpful:
Request URL: https://cdn.swansislandcompany.com/wp-content/uploads/2017/07/rare-wool-throw-335×335.jpg
Request Method: GET
Status Code: 304
Remote Address: [2600:9000:21da:f600:0:dc04:fa40:93a1]:443
Referrer Policy: no-referrer-when-downgrade
age: 44072
cache-control: max-age=2592000
date: Mon, 26 Aug 2019 11:25:00 GMT
etag: “afa710313270f917f718009b10ec85e1″
expires: access plus 30 days
server: AmazonS3
status: 304
via: 1.1 6cf3377e93378c7e591abeecafea2e6a.cloudfront.net (CloudFront)
x-amz-cf-id: zsng5b1ZflBB45PBpqy7CZ58onZ26ukBT7fAD33_9deOenEykRAA9w==
x-amz-cf-pop: EWR53-C1
x-amz-meta-access-control-allow-origin: *
x-amz-meta-content-type: image/jpeg
x-amz-meta-last-modified: Tue, 13 Aug 2019 10:27:53 GMT
x-amz-meta-link: <https://swansislandcompany.com/usr/share/nginx/html/wp-content/uploads/2017/07/rare-wool-throw-335×335.jpg>; rel=”canonical”
x-cache: Hit from cloudfront
:authority: cdn.swansislandcompany.com
:method: GET
:path: /wp-content/uploads/2017/07/rare-wool-throw-335×335.jpg
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cache-control: max-age=0
cookie: _ga=GA1.2.395516380.1534482950; _gid=GA1.2.1254501317.1566779581
if-modified-since: Mon, 19 Aug 2019 12:40:54 GMT
if-none-match: “afa710313270f917f718009b10ec85e1”
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36The page I need help with: [log in to see the link]
The topic ‘is browser caching working?’ is closed to new replies.