1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Website Building Question: How do You Handle the Browser Caching Issue?

Discussion in 'White Hat SEO' started by briptech, Oct 30, 2012.

  1. briptech

    briptech Power Member

    Joined:
    Apr 4, 2011
    Messages:
    534
    Likes Received:
    205
    Gender:
    Male
    Occupation:
    SEO Specialist
    Location:
    BHW
    Home Page:
    By using several PAGE SPEED LOAD analyzing tools (last but not least the YSlow add-on for Firebug) I noticed that one of main concern of most of my websites is the "Leverage browser caching" issue.

    That specifical issue is explained by the output of the tool:
    "Reduce the load times of pages by storing commonly used files from your website on your visitors browser."

    The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    http://www.mysite.com/wp-content/themes/theme-name/css/stylename.css (expiration not specified)
    http://www.mysite.com/wp-content/themes/theme-name/images/icons-header.png (expiration not specified)
    http://www.mysite.com/wp-content/themes/theme-name/images/background_1.jpg (expiration not specified)

    AND SO ON... The list goes on for at least 30+ resources.

    The strange thing is that if I run the same tool on SitePoint.com or similar trusted site I get the same kind of error.

    What do you think guys?
     
  2. kaloyan14

    kaloyan14 Regular Member

    Joined:
    Dec 12, 2011
    Messages:
    284
    Likes Received:
    65
    Occupation:
    webmaster, blogger
    Location:
    Eastern Europe
    Add expires header in your .htaccess file. A first-time visitor to your page will make several HTTP requests to download all your sites files, but using the expires headers you make those files cacheable. This avoids unnecessary HTTP requests on subsequent page views. To do it add these lines to your .htaccess file:
    You can increase the seconds period.
    Hope this will help. :)
     
    • Thanks Thanks x 1
  3. briptech

    briptech Power Member

    Joined:
    Apr 4, 2011
    Messages:
    534
    Likes Received:
    205
    Gender:
    Male
    Occupation:
    SEO Specialist
    Location:
    BHW
    Home Page:
    Thank you, I am checking out :)