【问题标题】:Is there a way to use .htaccess to cache images from a different domain有没有办法使用 .htaccess 缓存来自不同域的图像
【发布时间】:2012-02-05 04:28:44
【问题描述】:

我使用用户的浏览器缓存来缓存使用 .htaccess 文件和 mod.expires 托管在我的服务器上的图像。

这是我使用的:

ExpiresByType image/gif A604800

如何使用类似的东西来缓存来自我没有所有权的不同域的图像?

我正在尽量减少重新下载用户已经查看过的图像。

【问题讨论】:

  • 不,你不能。唯一的方法是让您的服务器下载图像,代理请求。

标签: image .htaccess caching mod-expires


【解决方案1】:

不,你不能。据我所知,浏览器没有任何机制来调整缓存设置。

【讨论】:

    猜你喜欢
    • 2014-11-12
    • 2013-03-07
    • 1970-01-01
    • 2012-06-12
    • 2022-01-04
    • 1970-01-01
    • 2020-12-11
    • 2015-10-07
    • 2012-06-27
    相关资源
    最近更新 更多