Page speed and "Broswer caching" and "Add Expires headers"

Permalink
I click yes on all "speed" C5 options. But get "Fix this" (in speed tests) about my own JS assets Requests and some cache images (from slider block):
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
/assets/src/js/uikit.min.js (expiration not specified)
che/b6256e983b8273db03eaed782dcc43ca.jpg (expiration not specified)
rest of the list....


I find this solution (edit htaccess)
https://gtmetrix.com/leverage-browser-caching.html...


But this its little problem (i dont have control on this by Concrete5 "clear cache").
How to "get rid" from this errors? (i want high score in the speed tests).

siton
 
webpresso replied on at Permalink Best Answer Reply
webpresso
Ha you added this to your htaccess?

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##


This has nothing to do with the concrete5 caching. .htaccess is in the root of your installation. GTmetrix should recognize this automatically.
Schattenreich replied on at Permalink Reply
Schattenreich
Ok this was a great help. I still get a bunch of js files as not utilizing cashing properly such as
/packages/fundamental/themes/fundamental/js/foundation.min.js
/packages/fundamental/themes/fundamental/js/vendor/modernizr.js
/updates/concrete5.7.5.13_remote_updater/concrete/js/jquery.js
/updates/concrete5.7.5.13_remote_updater/concrete/js/picturefill.js

and also a couple others like
http://fonts.googleapis.com/css?family=Open+Sans:400,700...
http://fonts.googleapis.com/css?family=Volkhov:400...

any suggestions?