利用fastcgi模块在PHP上利用浏览器缓存问题

时间:2017-06-14 12:00:45

标签: php google-pagespeed

我的网站正在使用fastcgi模块的PHP上运行。在服务器上启用pagespeed模块时,Google mod_expire中存在杠杆浏览器缓存问题。我在htaccess中使用了以下代码,但它无效。

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>

我已经要求服务器人,他回复了

  

“因为您在php上运行该网站,该网站作为'fastcgi运行   module',无法通过htaccess设置这些值。“

如何在没有.htaccess

的情况下删除js,css和图片的杠杆浏览器缓存问题

0 个答案:

没有答案
相关问题