Sorry if this question sounds a bit basic, I just want to be double sure.
I retrieve my images with a URL like so
image.jpg?m=54437
The end numbers allow me to cache control it. When the image changes, so do those numbers.
I am sending these headers with these images
HTTP/1.1 200 OK
Date: Thu, 01 Jul 2010 00:54:19 GMT
Server: Apache
Last-Modified: Wed, 23 Jun 2010 01:06:58 GMT
Etag: "64b019c-49bb-489a8278e7080"
Accept-Ranges: bytes
Content-Length: 18875
Cache-Control: max-age=15552000
Expires: Tue, 28 Dec 2010 00:54:19 GMT
Content-Type: image/jpeg
So I thought with that expires
header (currently adds 6 months from today) would mean the browser would not download it again until that time is up.
However, if that were the case, shouldn't the server return 304 not modified and not 200 OK?
Another strange this is when I view Firebug's net tab, those images do say 304 not modified.
Am I doing this correctly?
Thanks
Update
Here is a screenshot of Firebug
.
If you visit here too, you can inspect the headers for yourself.
My .htaccess
rules for the expiry looks like this
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "now plus 1 year"
ExpiresByType text/javascript "now plus 1 year"
ExpiresByType image/jpeg "now plus 6 months"
</IfModule>