I would like to cache a particular image on my website i.e the background image.
So far i only see options that allow you to define the format type(png|jpg|ico) is there anyway to let the browser cache the background
I use the following to set far future expiration dates for all media files:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|ico|js|css|swf)(\.gz)?$"> Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT" Header unset ETag FileETag None </FilesMatch>
and I'd recommend using it because it will help out on the bandwidth and speed front's but this code would allow you to set the expiry for a specific file.
<Files "test1.jpg"> ExpiresActive On ExpiresDefault A60 </Files>