Web Hosting Talk







View Full Version : Configuring Apache Image Caching


MattF
06-11-2001, 03:35 PM
Ideally I would like to configure Apache to tell the client to cache images on webhostingtalk for as long as possible. When a visitor starts a new session on this site (ie. restarts PC and visit webhostingtalk.com) all the images are loaded again, this takes time and bandwidth. I've noticed with other webserver such as Resin you can specify in the configuration to tell the client (ie. browser) to cache the images for X days/hours. Is their some way to do this in .htaccess for Apache. e.g.

Cache *.gif 720hours :confused:

jtan15
06-11-2001, 09:19 PM
There might be an easier way, but you can install mod_cache. It can be found here:

http://httpd.apache.org/dist/httpd/contrib/modules/1.3/apache-contrib-1.0.8.tar.gz

Once you install that, you must be very careful with it. Here is documentation for it:

http://httpd.apache.org/docs-2.0/mod/mod_file_cache.html

Good luck. :)