View Thread : Caching the images of your webpage using .htaccess


mrinal
To make all ur website's image saved to browsers cache of users to speed up things put the following code to end of your .htaccess file.

### activate mod_expires
ExpiresActive On

### Expire .gif's 1 month from when they're accessed
ExpiresByType image/gif A2592000

### Expire .png's 1 month from when they're accessed
ExpiresByType image/png A2592000

### Apply a Cache-Control header to index.html
<Files index.php>
Header append Cache-Control "public, must-revalidate"
</Files>

It's good idea to cache the images for 1 months.