Totally Zenned
- Join Date:
- Aug 2014
- Location:
- Lisbon
- Posts:
- 597
- Plugin Contributions:
- 0
leverage browser cache ( PageSpeed Insights ) and htaccess
Hi
I've been trying to improve the results on PageSpeed Insights ( desktop I have a green light, mobile I manage to get from red to yellow :dontgetit )
There a section ( leverage browser cache ) , that says :
http://s7.addthis.com/js/300/addthis_widget.js (expires not specify)
http://s7.addthis.com/l10n/client.pt.min.json (expires not specify)
http://m.addthisedge.com/…22a0&callback=_ate.track.config_resp (60 seconds)
http://example.net/…t_bookx_info/jscript_textarea_counter.js (60 minutes)
http://example.net/…ludes/templates/tpl_pb/jscript/tpl_pb.js (60 minutes)
http://example.net/…udes/templates/tpl_pb/css/stylesheet.css (2 hours)
http://example.net/…mplates/tpl_pb/css/stylesheet_cookie.css (2 horas)
I've follow a tutorial here on zencart , and more or less I have this in the htaccess file
## Optional caching improvements
## Requires mod_header and mod_deflate to be enabled within Apache
##################
<IfModule mod_headers.c>
Header unset Pragma
FileETag None
Header unset ETag
<FilesMatch ".*\.(ico|jpe?g|JPE?G|gif|GIF|webp|png|swf|flv)$">
Header set Cache-control "max-age=864000, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
<FilesMatch ".*\.(html|htm|xml|txt|xsl)$">
Header set Cache-control "max-age=7200, must-revalidate"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
##################
## Optional improvements
## Requires mod_expires to be enabled within Apache
##################
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault A300
ExpiresByType application/x-javascript A3600
ExpiresByType text/css A3600
ExpiresByType image/gif A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
ExpiresByType text/html A300
ExpiresByType image/x-icon A86400
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
</ifmodule>
I dont's understand what else I should do.
His telling that the js as a expire ( 60 minutes ) , and yet keeps saying to leverage the browser cache.... :frusty:
Anyone knows a way to ..... improve, or whatever this stuff ?
Thanks
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison