1 Reply Latest reply: Dec 2, 2010 4:25 AM by David_Powers RSS

    Speed Test - Web Developers Toolbar

    broomeGirl Community Member

      Hi!  I have recently downloaded the above and have been testing my site  and have come up with this on practically every page .. The following  cacheable resources have a short freshness lifetime.  Specify an  expiration at least one week in the future for the following  resources:
      They are js, jpegs, swfs etc.

       

      Some-one suggested that I paste this code in my .htacess file

       

      <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"  >
      Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
      </FilesMatch>

       

      Obviously I would have to change the date to some future date but I would like to know how far in the future I should make it and whether I have to make a note in my calendar to change it when it gets close to the expiry date and then re-upload it and how important is it?

       

      Thanks!

        • 1. Re: Speed Test - Web Developers Toolbar
          David_Powers CommunityMVP

          OhDer wrote:

           

          Obviously I would have to change the date to some future date but I would like to know how far in the future I should make it and whether I have to make a note in my calendar to change it when it gets close to the expiry date and then re-upload it and how important is it?

          You question highlights the problem with using that technique. Many images will never change, so you can set the expiry date several years in advance. However, if you change an image, browsers and proxies that have already visited the site won't display the updated version. The way to get round that problem is to add an incremental number at the end of an updated image, but then you need to update the HTML markup, as well.

           

          Maybe others can comment on the usefulness of this technique. As far as I'm aware browsers check whether a file has changed since it was last accessed, so the amount of delay caused by not setting an expiry date is likely to be minimal.