CodeIgniter Forums
Website Caching and responses - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Website Caching and responses (/showthread.php?tid=48202)



Website Caching and responses - El Forum - 01-08-2012

[eluser]minerbog[/eluser]
Hi All,

I am going to assume this is really more of an Apache thing more than CI but I thought I would ask it here first before signing up to other forums Smile

Here is a copy of my htaccess file :
<code>
<IfModule mod_expires.c>
ExpiresActive On
FileETag none
# Set Expires Headers
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires A2419200
</FilesMatch>
</IfModule>

<IfModule mod_headers.c>
ExpiresActive On
FileETag none
# Set Expires Headers
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=2419200"
</FilesMatch>
</IfModule>
</code>
Basically, every item listed has a cache dated 1 month in the future.

When I check this with firebug, the page loads as normal. Then I navigate elsewhere on the site. The images don't even request (which is correct) but the css checks and downloads with a 200OK response even though it shows that the current cache doesn't expire until a months time?? But if I hit refresh the css file returns a 304 Not-Modified response but don't download??

Please help! Why are my css caches not working as they should yet the images are fine!?!!

Many Thanks Smile