Leverage Browser Caching

Permalink
I am doing a bunch of SEO stuff for my employer's site. Google PageSpeed Insights tells me that the leverage browser caching needs optimizing.

In the cache settings, I have everything turned on for the recommended settings. I have also tried modifying the .htaccess file, but that didn't satisfy the analysis.

Any ideas / suggestions on how I can fix this issue?

PineCreativeLabs
 
Cahueya replied on at Permalink Reply
Can you check the site throughhttp://www.webpagetest.org/ and see which ressources are not cached?

If there are external sources like Googlefonts, Googlemaps or anything like it, they get their caching headers from their origin which can be very briefly (24hrs for Maps) which is not sufficient caching but there is nothing you can do about it as long as it gets called from Googles Services.
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
A majority of the resources are internal - CSS and image files - mostly from the files cache directory.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
What is the site url?
webpresso replied on at Permalink Reply
webpresso
Doesn't the message 'leverage browser cache' mean to set higher caching-time on your server? E.g. caching of css-files for 1 month etc.

You can try this in your .htaccess:

<IfModule mod_expires.c>
   <IfModule mod_headers.c>
      Header unset Pragma
      FileETag None
      Header unset ETag
      # keep alive
      Header set Connection keep-alive
      #meta ie,edge
      BrowserMatch MSIE ie
      Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
      # Turn on Expires and set default to 0
      ExpiresActive On
      ExpiresDefault A0
      # Set up caching on media files for 1 year (forever?)
      <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|gif|jpg|jpeg|png|swf|svg|woff)$">


You should check what you already have set.
In my opinion the times are too long - but the seo analysis tool checks for this long period of caching and shows the message if it is too short.

Hope this helps, Roland