I have setup browser caching of all images and css/js files. Still, when I look a the browser's web developer tools under the network panel, it seems like each cached file is nonetheless retrieved from the server.
This is what I have in my .htaccess:
<ifModule mod_headers.c>
<ifModule mod_expires.c>
# images for 1 hour
<filesMatch "\.(jpeg|jpg|png|gif|flv|pdf|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 hours"
Header set Cache-Control "public, max-age=3600, must-revalidate"
</filesMatch>
# CSS and js for longer
<filesMatch "\.(ico|css|js|eot|ttf|ttc|otf|woff)$">
ExpiresActive On
ExpiresDefault "access plus 7 days"
Header set Cache-Control "public, max-age=604800, must-revalidate"
</filesMatch>
</ifModule>
</ifModule>
# do not use ETag
FileETag None
For an CSS file like https://www.fiveroasters.de/wp-includes/css/dashicons.min.css?ver=3.9.2 this results in the following headers:
Accept-Ranges bytes, bytes
Age 0
Cache-Control public, max-age=604800, must-revalidate
Connection keep-alive
Content-Encoding gzip
Content-Length 24803
Content-Type text/css
Date Fri, 26 Sep 2014 21:26:10 GMT
Expires Fri, 03 Oct 2014 21:26:10 GMT
Last-Modified Tue, 27 May 2014 09:24:09 GMT
Server Apache/2.4.10
Vary Accept-Encoding
Via 1.1 varnish
This looks right to me, still the browser does not cache it, but each request still causes a full download (http code 200). Same for JS, images, etc. Why? You can have a look yourself at https://www.fiveroasters.de
(I have the cache settings enabled under the webtools settings.)