#1
  1. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2

    Browser Caching - Google Pagespeed Insights


    I want to be able to enable browser caching on my Godaddy Cpanel Apache Hosting Server and have the following code.
    I want to make sure that my syntax and default caching rules are set properly. Does the syntax look proper?
    This is one of the recommendations from Google PageSpeed Insights to increase page load speed.

    ### HEADERS, CACHING AND OPTIMIZATION
    # 300 5 M
    # 2700 45 M
    # 3600 1 H
    # 54000 15 H
    # 86400 1 D
    # 518400 6 D
    # 604800 1 W
    # 1814400 3 W
    # 2419200 1 M
    # 26611200 11 M
    # 29030400 1 Y (never expire)

    ### HEADER CACHING
    #-> /htaccess/speed-up-sites-with-htaccess-caching.html
    <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$">
    Header set Cache-Control "max-age=2592000"
    </FilesMatch>
    <FilesMatch "\.(js|css|pdf|swf)$">
    Header set Cache-Control "max-age=604800"
    </FilesMatch>
    <FilesMatch "\.(html|htm|txt)$">
    Header set Cache-Control "max-age=604800"
    </FilesMatch>
    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
    Header unset Cache-Control
    </FilesMatch>

    ## ALTERNATE EXPIRES CACHING
    ExpiresActive On
    ExpiresDefault A604800
    ExpiresByType image/x-icon A2592000
    ExpiresByType application/x-javascript A2592000
    ExpiresByType text/css A604800
    ExpiresByType text/html A300
    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
    ExpiresActive Off
    </FilesMatch>

    ## META HTTP-EQUIV REPLACEMENTS
    <FilesMatch "\.(html|htm|php)$">
    Header set imagetoolbar "no"
    </FilesMatch>
  2. #2
  3. Super Moderator
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    May 2015
    Location
    United Kingdom
    Posts
    1,364
    Rep Power
    2206
    How're you managing the images on your website? Do you often change the image but keep the filename the same? May seem strange but it is a relevant question.
    Always happy to help in private message. | Learn about my latest project Can You Get Automated Pages To Rank In Google?
    Useful Links: Useful SEO Tools | GTmetrix | FileOptimizer | Cloudflare
  4. #3
  5. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2
    Originally Posted by ThomasHarvey
    How're you managing the images on your website? Do you often change the image but keep the filename the same? May seem strange but it is a relevant question.
    Thomas - We barely change the images if at all. We just add images on occasion. The site is mostly static.
  6. #4
  7. Super Moderator
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    May 2015
    Location
    United Kingdom
    Posts
    1,364
    Rep Power
    2206
    Originally Posted by BrownBag
    Thomas - We barely change the images if at all. We just add images on occasion. The site is mostly static.
    Then yes I think this would be good for you.

Similar Threads

  1. Leverage browser caching
    By tvt4892 in forum New User SEO Questions and Answers
    Replies: 1
    Last Post: Feb 3rd, 2016, 02:15 AM
  2. PageSpeed Insights
    By Lb1878 in forum Search Engine Optimization
    Replies: 0
    Last Post: Mar 16th, 2013, 08:45 AM
  3. Enable Browser Caching
    By zoddy in forum Google Optimization
    Replies: 2
    Last Post: Jan 1st, 2010, 02:21 AM
  4. Replies: 1
    Last Post: Jul 23rd, 2009, 11:36 AM
  5. Google Insights for Search
    By channel5 in forum Google Optimization
    Replies: 1
    Last Post: Aug 8th, 2008, 07:51 AM

IMN logo majestic logo threadwatch logo seochat tools logo