1

How can I cache images on the client side so the client doesn't request the same images again and again unless the server side images have changed?

4

2 回答 2

3

您可以使用 apache 和 mod_expires 执行此操作: http ://httpd.apache.org/docs/2.2/mod/mod_expires.html

本教程可能适用:http: //www.inmotionhosting.com/support/website/how-to/apache-module-mod-expires

于 2013-08-08T02:18:10.150 回答
3

如果您在 php 中动态创建图像,那么您可以使用 E-Tag 来帮助浏览器缓存图像。

http://php.net/manual/en/function.http-cache-etag.php

于 2013-08-08T02:23:39.950 回答