• The pageSpeed insight of my website http://www.oratechsolve.com requires tuning for leverage browser caching.

    It shows files under wp-content/plugins/.…….js&ver=3.9.2 (24 hours)

    How do I increase the expiry date or a maximum age in the HTTP headers for resources?

    My .htaccess file has following settings.

    # BEGIN WordPress

    Header unset Pragma
    FileETag None
    Header unset ETag

    # BEGIN Cache-Control Headers
    <ifmodule mod_headers.c>
    <filesmatch “\.(flv|gif|jpg|jpeg|png|ico|swf)$”>
    Header set Cache-Control “max-age=31536000”
    </filesmatch>
    <filesmatch “\.(css|pdf)$”>
    Header set Cache-Control “max-age=31536000”
    </filesmatch>
    <filesmatch “\.(js)$”>
    Header set Cache-Control “max-age=3153600, private”
    </filesmatch>
    </ifmodule>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase //
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . //index.php [L]
    </IfModule>

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 year”
    ExpiresByType application/pdf “access 1 year”
    ExpiresByType text/x-javascript “access 1 year”
    ExpiresByType application/x-shockwave-flash “access 1 year”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 1 year”
    Header set Cache-Control “public”
    </IfModule>
    ## EXPIRES CACHING ##

    ##Compress Components##
    <IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </IfModule>

    # END WordPress

  • The topic ‘How to leverage browser caching in All in One SEO’ is closed to new replies.