Hello.all,you can see my Report https://gtmetrix.com/reports/targetmarts.com/6QMWojJv
it display many images,js,css are missing a cache validator.
SO i ask to use Specify a cache validator.
Now i host in godaddy,php 7.0.27 (Zend: 3.0.0),used IH5 ,and some template images define in php files.
the .htaccess in root as below now:
PHP Code:
## Header Settings
<IfModule mod_headers.c>
# Set the default language of your site
Header set Content-Language "en-us"
Header unset Pragma
FileETag None
Header unset ETag
#Header set Cache-Control "no-transform"
<FilesMatch "(?i).*\.(ico|jpe?g|gif|webp|png|otf|swf|flv|ttf|woff|eot|svg)$">
Header set Cache-control "max-age=864000, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
<FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
Header set Cache-control "max-age=7200, must-revalidate"
</FilesMatch>
# Ensure the most current site files are being provided
Header set Cache-Control "proxy-revalidate, stale-while-revalidate=86400, stale-if-error=259200"
# Prevents seeing information not needed to see
Header unset X-Powered-By
# Protection against PHP or Javascript code placed within images and other misinterpretations of your resources.
Header set X-Content-Type-Options "nosniff"
# Protection against Clickjacking
Header set X-Frame-Options "SameOrigin"
# Protection against XSS (Cross-Site Scripting)
Header set X-XSS-Protection "1; mode=block"
# Protection against abuse of Adobe Flash / Silverlight / PDF files
Header set X-Permitted-Cross-Domain-Policies "Master-Only"
</IfModule>
#############################
## EXPIRES CACHING
# Note: You cannot set expires headers for files or content you are loading from a different site.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 day"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
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 image/x-icon "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
# Embedded OpenType (EOT)
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType font/eot "access plus 1 month"
# OpenType
ExpiresByType font/opentype "access plus 1 month"
# TrueType
ExpiresByType application/x-font-ttf "access plus 1 month"
# Web Open Font Format (WOFF) 1.0
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
# Web Open Font Format (WOFF) 2.0
ExpiresByType application/font-woff2 "access plus 1 month"
</IfModule>
in bmz_cache as below now:
PHP Code:
<IfModule mod_headers.c>
Header unset Pragma
FileETag None
Header unset ETag
#Header set Cache-Control "no-transform"
<FilesMatch "(?i).*\.(ico|jpe?g|gif|webp|png|otf|swf|flv|ttf|woff|eot|svg)$">
Header set Cache-control "max-age=864000, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
<FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
Header set Cache-control "max-age=7200, must-revalidate"
</FilesMatch>
</IfModule>
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresByType image/x-icon A86400
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/gif A604800
ExpiresDefault "access plus 15 days"
ExpiresByType image/gif "access plus 15 days"
ExpiresByType image/png "access plus 15 days"
ExpiresByType image/jpg "access plus 15 days"
</ifmodule>
so please help me to fix this .
Thanks
Bookmarks