【发布时间】:2017-08-18 09:32:33
【问题描述】:
这是我的 .htaccess 文件,我在其中添加了过期标头,用于在我的网站中进行存档缓存和页面速度。
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
但是几天后我需要对我的文件进行一些修改,所以我只是修改了我的文件,但由于这个过期标题,没有单个文件反映。我总是得到旧文件。所以我决定从 .htaccess 中删除上面给出的代码。但删除代码后没有结果。我也多次清除所有浏览器数据,但没有结果。
所以我只想知道如何清除浏览器/服务器中的所有缓存,这些缓存是通过设置过期标头来缓存的。
我的网站在apache+php服务器上运行。
【问题讨论】:
标签: php .htaccess caching header