Right now I am trying to minimize the 304 requests to my website. I have implemented the suggestions called for here:
Asking browsers to cache as aggressively as possible
However no matter what I do some images refuse to be pulled from the cache even though they are similar to other ones that are pulled. Right now we are using IIS 7.5 and chrome to view the network traffic.
Here is an example of the initial response for the image, btn-blue.png, that will pull from the cache:
Accept-Ranges:bytes
Content-Length:49585
Content-Type:image/png
Date:Fri, 27 Jan 2012 16:02:26 GMT
ETag:"26cb96cdccc1:0"
Expires:Sat, 31 Dec 2012 00:00:00 GMT
Last-Modified:Thu, 26 Jan 2012 20:49:46 GMT
Server:Microsoft-IIS/7.5
X-Powered-By:ASP.NET
Here is an example of the response header for the image, topnav-blue-poweredbyipipeline.png, that will never pull from the cache:
Accept-Ranges:bytes
Content-Length:2680
Content-Type:image/png
Date:Fri, 27 Jan 2012 16:02:17 GMT
ETag:"b85767a6cdccc1:0"
Expires:Sat, 31 Dec 2012 00:00:00 GMT
Last-Modified:Thu, 26 Jan 2012 20:49:47 GMT
Server:Microsoft-IIS/7.5
X-Powered-By:ASP.NET
Any idea why one would pull and the other one won't?
An HTTP 304 not modified status code means that the website you're requesting hasn't been updated since the last time you accessed it. Typically, your browser will save (or cache) web pages so it doesn't have to repeatedly download the same information. This is an attempt to speed up page delivery.
A 304 Not Modified message is an HTTP response status code indicating that the requested resource has not been modified since the previous transmission, so there is no need to retransmit the requested resource to the client.
So we figured out why this was happening. It turns out if you use the Enter button to navigate to a web page Chrome will aggressively use its cache. If you use the refresh button Chrome will make a call out for almost every element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With