Current time: 10-21-2019, 10:19 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Magic? F in "cache static content" but requests go from 55 to 2 in repeat view
10-09-2015, 04:54 AM (This post was last modified: 10-09-2015 05:16 AM by greenjobs.)
Post: #1
Magic? F in "cache static content" but requests go from 55 to 2 in repeat view
I have run several tests on the web site of the German Solar Industry Association - and the results are consistently only "F"s (something I have never ever seen before in webpage test): http://www.webpagetest.org/result/151008_VG_14W1/

The one thing that absolutely really puzzles me: None of the static resources comes with a max-age or expires header. And still: They are not downloaded in the repeat view. In repeat view, only the HTML page itself and the Piwik statistic script is called (requests go down from 55 to 2, Bytes from 1,051 KB to 35kB).

How is this possible? Why don't the browsers (I tested FF and Chrome) try to download the static assets, again? What caching mechanism is used here?

OK, I found out, why the browsers do not re-download static assets: Using LiveHTTPHeaders on my local FF, I can see that in fact there are expires headers sent. The time is short (just one week), but it is enough to no re-download the assets.

The strange thing is: If I look at the http response given in WPT, no expires headers show up. They seemed to be stripped from the reply of the server. The browsers use them nevertheless.

Is this a bug in WPT? I tested two different instances with the same result...?
Find all posts by this user
Quote this message in a reply
10-09-2015, 05:23 AM
Post: #2
RE: Magic? F in "cache static content" but requests go from 55 to 2 in repeat view
When there is no expires header the browser can use heuristics based on last-modified to decide how long to cache it for (most modern browsers do). That's why you don't see them re-requested.

You can grab a tcpdump to be positive but WPT captures the data from the wire so I'm fairly certain they weren't sent.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-09-2015, 06:59 PM
Post: #3
RE: Magic? F in "cache static content" but requests go from 55 to 2 in repea...
Thank you for taking the time to personally answer my question, Pat! And many thanks for giving us Webpagetest. I have used it for years; it is such an amazing tool.

(10-09-2015 05:23 AM)pmeenan Wrote:  When there is no expires header the browser can use heuristics based on last-modified to decide how long to cache it for (most modern browsers do). That's why you don't see them re-requested.
That makes a lot of sense - thank you for the explanation!

(10-09-2015 05:23 AM)pmeenan Wrote:  You can grab a tcpdump to be positive but WPT captures the data from the wire so I'm fairly certain they weren't sent.
I re-checked and you are absolutely correct. I mistakenly looked at the request of a CSS-file for which there is a short expires time set. The images really do not have any expires header.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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