Current time: 12-17-2017, 08:11 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cache Static Content showing as failed even though Expiry Header is set to 2 months
10-26-2017, 05:55 PM (This post was last modified: 10-26-2017 05:56 PM by vikrammaduri05.)
Post: #1
Cache Static Content showing as failed even though Expiry Header is set to 2 months
In optimization summary, Leverage Cache of Static Content showing as failed, but Expiry header was already set to 2 months.

Refer attachement 1 for Optimization Summary
Refer attachement 2 for Response Header Details(where Expiry header is set 2 months)


Attached File(s) Image(s)
       
Find all posts by this user
Quote this message in a reply
10-27-2017, 03:57 AM
Post: #2
RE: Cache Static Content showing as failed even though Expiry Header is set to 2 months
Hello! It looks like your Cache-Control header has two max-age directives. The first is for 600s (10 minutes) and the second is for 5184000 seconds (60 days). Your expires header seems to correlate with the 60 day value.

According to the HTTP specification, a browser should prefer the Cache-Control max-age directive over the Expires header if both are present (see https://tools.ietf.org/html/rfc7234#section-4.2.1). You are sending two max-age directives, but there's a good chance that a client will use the first max-age directive it finds - since it's uncommon for a server to send more than one...

I was able to validate that this is what is happening in Firefox, since about:cache will let you see what the browser calculated how long the object will be stored in it's cache. When I load it in Firefox, the browser will only cache it for 10 minutes.

Below is what I was able to find it about:cache for this entry -

Cache entry information
key: https://ww.heatcraftrpdqa.com/_ui/respon...oerror.png
fetch count: 1
last fetched: 2017-10-26 13:39:32
last modified: 2017-10-26 13:39:33
expires: 2017-10-26 13:49:32
Data size: 18346 B
Security: This is a secure document.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)