Cache headers detection
|
08-20-2018, 09:10 PM
(This post was last modified: 08-24-2018 12:48 AM by benjiiim.)
Post: #1
|
|||
|
|||
Cache headers detection
Hi there,
I have an issue when testing https://www.alpha-croisiere.com/fr/accueil.aspx Webpagetest is telling me that the two following resources have no max-age or expires headers: - https://www.alpha-croisiere.com/bundles/...woVHcDAX01 - https://www.alpha-croisiere.com/bundles/...Bzds_F51I1 However, when using F12 or Fiddler to double check, I can see the following headers, with an expiration date set to 1 year: Cache-Control: public Content-Encoding: gzip Date: Mon, 20 Aug 2018 09:56:42 GMT Expires: Tue, 20 Aug 2019 09:56:43 GMT Last-Modified: Mon, 20 Aug 2018 09:56:43 GMT Vary: User-Agent,Accept-Encoding Am I doing something wrong? Thanks a lot. Regards, -- Benjamin |
|||
08-24-2018, 03:51 AM
Post: #2
|
|||
|
|||
RE: Cache headers detection
Not entirely sure. The code is definitely getting tripped up because there is both a Cache-Control header and an Expires header. Usually Cache-Control is preferred if it is present but in this case the Cache-Control header doesn't include a max-age and just includes public:
HTTP/1.1 200 OK Cache-Control: public Transfer-Encoding: chunked Content-Type: text/css; charset=utf-8 Content-Encoding: gzip Expires: Fri, 23 Aug 2019 17:45:02 GMT Last-Modified: Thu, 23 Aug 2018 17:45:02 GMT Vary: User-Agent,Accept-Encoding Date: Thu, 23 Aug 2018 17:45:01 GMT I honestly don't know how browsers will react to that. If possible, I'd encourage changing the Cache-Control to be "public, max-age=31536000". |
|||
08-24-2018, 09:24 PM
Post: #3
|
|||
|
|||
RE: Cache headers detection
Thanks a lot Patrick.
I'm not sure neither if that was really an issue or not, but I've added the max-age directive to the response just in case. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)