I added this code, from zc tutorial to my includes/.htaccess to try and improve my loading speed.
Code:
## 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>
My google site speed test https://developers.google.com/speed/pagespeed/insights/ actually dropped my score a few points.
Among the suggestions - optimize images, leverage cache.
I use IH4 (last version in plugins, not the github). So vast majority of images are already optimized, no? Or maybe my originals are too large?
I'm running the speed test on my home page which includes product photos in new and featured tabs and these are re-sized images. But google gods say they lack expiry dates.
IH4 is storing the images in root folder /bmz_cache which has the following .htaccess:
Code:
# deny *everything*
<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>
# but now allow just *certain* necessary files:
<FilesMatch ".*\.(jpe?g|JPE?G|gif|GIF|png|PNG|swf|SWF)$" >
Order Allow,Deny
Allow from all
</FilesMatch>
IndexIgnore */*
## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI
Could I/should I add the same code addition from the /includes/.htaccess to the obottom of the bmz_cache/.htaccess?
zc 1.5.5a, Responsive Sheffiled Blue 2.0 adapted to same, IH4, many mods.
Bookmarks