My goal
I would like browsers to cache my entire site, but only load static content when I modify one or more files.
My situation
After some research, I found a way to do this. That is, to add the Far Future Expires Header file to my htaccess and add files to them using the filemtime() function.
Problem
When I click on the address bar and type in the address of my site in firefox, then Firebug displays
38.3 KB (36.4 KB from cache)
When I press F5 in firefox, Firebug shows:
241.1 KB (10.9 KB from cache)
Now I tried to do the same with Google, and they send the HTTP 304 header back. I read a lot about ETag and the Last Modified header, but I heard a lot of people saying that they are not very reliable.
My question
What would be a better solution if I wanted to send the HTTP 304 header back with static content if the user clicks on F5, like Google?
I ask this question because I often visit the site and use F5 to find out if there is any new information. Do not reload images, etc.
Refresh
It seems that Firefox controls the way the cache is used, and I would like to use the cache when the user presses F5.
php caching header .htaccess
Michiel patch
source share