Base html file receives red x mark for 'Cache Static Content'
|
10-27-2011, 09:08 PM
Post: #1
|
|||
|
|||
Base html file receives red x mark for 'Cache Static Content'
There might have been an update to WebPageTest yesterday, which affected this. Since yesterday afternoon, any website tested at any WPT location has resulted in its base html file receiving a failing mark for 'Cache Static Content. Prior to yesterday, the test did not rate the base html file for 'Cache Static Content'.
Marvin |
|||
10-27-2011, 10:26 PM
Post: #2
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Yeah, good catch :-) I updated the caching logic to be a lot more explicit. It used to not check html and a couple of other mime types and it used to give an automatic pass to anything that had an expires header, regardless of the time.
The new logic (should) decode the date, expires, age and cache control headers and calculates the actual TTL for every resource. The only resources that are ignored are: - no-cache (pragma or cache-control) - negative expires time (usually set for explicitly dynamic content) - app manifest files I would expect your HTML to have a negative expires time or explicitly be set to not cache. Can you shoot a sample test over for me to look at? I made the change (and was planning on talking about it tomorrow) because there were a good number of sites that were setting text/html for all kinds of content (javascript, images, all sorts of crazy stuff). |
|||
10-27-2011, 10:44 PM
Post: #3
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Thanks for the explanation, Pat. Here's a link to a test result:
http://www.webpagetest.org/result/111027...imization/ Quote:Response Headers: Marvin |
|||
10-27-2011, 10:55 PM
Post: #4
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Unless I'm misreading the specs, private just means that a shared cache cannot cache the page, it will not prevent the browser itself from caching the page. For dynamic content it should be no-cache.
I could easily be wrong, that's just what I got from browsing around and from my memory. |
|||
10-28-2011, 12:02 AM
Post: #5
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
No, Pat, you are correct. I just read about it on W3.
I've corrected it on my end: http://www.webpagetest.org/result/111027...imization/ Quote:Response Headers: In case other vBulletin users experience the same, to correct it go to: vB AdminCP > vBulletin Options > Cookies and HTTP Header Options > Add No-Cache HTTP Header > Yes > Save Marvin |
|||
10-28-2011, 12:07 AM
Post: #6
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Excellent :-)
|
|||
01-22-2012, 10:24 AM
Post: #7
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Hi Pat,
Three months have passed since we talked in this thread. In the past week, I've done some changes to the configuration of my site. The changes included a new Cache-Control header: Code: Cache-Control: must-revalidate, max-age=0, s-maxage=86400 The "must-revalidate, max-age=0," part is (if I'm correct) telling the browsers not to cache (my html). The "s-maxage=86400" part is letting proxies cache it. This is not a common scenario, but I wonder if you think the WebPageTest should not fail it with an "F". Some test location (for example your Dulles, VA) give it an "A", but some (I can list them if needed) constantly give it a failing "F" (example). Marvin |
|||
01-23-2012, 09:16 PM
(This post was last modified: 01-23-2012 11:25 PM by Marvin.)
Post: #8
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
I've corrected it on my end by replacing my existing:
Expires: 0 with the following: Expires: Sat, 26 Jul 1997 05:00:00 GMT Now the test gives me A. http://www.webpagetest.org/result/120123...b59dffcc6/ Hmm, the base html file in the "Repeat View" is highlighted yellow. Does it mean my headers are still not the way they should be? Marvin |
|||
01-24-2012, 04:30 AM
Post: #9
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Yellow just means that the browser made a request and got a "not modified" (or other 3xx code) as a response. In this case I think that's exactly what you want.
Looking at the headers: http://www.webpagetest.org/result/120123.../#request1 it looks like there is an X-Cache: hit response which means it was served directly from the CDN. |
|||
01-24-2012, 05:24 AM
Post: #10
|
|||
|
|||
RE: Base html file receives red x mark for 'Cache Static Content'
Thanks Pat!
Marvin |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)