Current time: 04-05-2020, 08:44 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why isn't 301 Cached?
07-01-2013, 03:18 PM (This post was last modified: 07-01-2013 03:23 PM by rviscomi.)
Post: #1
Why isn't 301 Cached?
In this test result, google.com is hit twice. It is getting a 301 redirect to http://www.google.com but on the repeat view, the browser is not using the cached redirect and attempts to hit google.com.

See http://www.webpagetest.org/result/130701...f426a31b1/

Why isn't the cached redirect used on the repeat view? My hunch is that despite the Expires and Cache-Control headers, it is lacking either an E-Tag or Last-Modified header. Is that the case here? Could this be an oversight?


Response headers:
Code:
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Mon, 01 Jul 2013 05:10:44 GMT
Expires: Wed, 31 Jul 2013 05:10:44 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Visit this user's website Find all posts by this user
Quote this message in a reply
07-01-2013, 06:55 PM
Post: #2
RE: Why isn't 301 Cached?
What happens in the other browsers?

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
07-01-2013, 11:28 PM
Post: #3
RE: Why isn't 301 Cached?
That's really bizarre. Initially I thought it might be an issue with getting data from dev tools and accidentally showing a request from cache but the timings and tcpdump show that it really is hitting the wire: http://cloudshark.org/captures/5c061ee495e8?filter=http

IE9: http://www.webpagetest.org/result/130701...151c58c09/
and Firefox: http://www.webpagetest.org/result/130701...53bfdb2c5/

are both caching it as you'd expect.

Going to take some more digging to verify that it isn't something with how WPT runs the tests but it looks like a caching bug in Chrome to me. If so that would be a really good find.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-23-2015, 04:46 PM
Post: #4
RE: Why isn't 301 Cached?
Hey Pat, remember this? I just reran the test and seeing the same results: http://www.webpagetest.org/result/150323...8dcd1991d/

Now we have a 301 to www and a 302 to https that are not showing up as cached in the repeat view.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-23-2015, 10:31 PM
Post: #5
RE: Why isn't 301 Cached?
Good question. Needs a little validating to be sure it's not something WPT is doing but looks like a Chrome bug.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-23-2015, 11:13 PM
Post: #6
RE: Why isn't 301 Cached?
Looks like a bug and Canary still has the same issue (Firefox and IE 11 correctly cache it). Just filed a Chrome bug on it: https://code.google.com/p/chromium/issue...?id=469675
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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