小编umb*_*rto的帖子

用于 webp 图像的 htaccess 缓存控制

这是我的 htaccess 缓存控制策略:

<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>

<FilesMatch "\.(js|css|pdf|swf)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>

<FilesMatch "\.(html|htm|txt)$"> Header set Cache-Control "max-age=600" </FilesMatch>

<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> Header unset Cache-Control </FilesMatch> 

<FilesMatch "\.(eot|otf|ttf|woff|woff2|svg)$"> Header set Cache-Control "max-age=31536000" </FilesMatch>
Run Code Online (Sandbox Code Playgroud)

现在,对于 webp 图像是否可以设置缓存控制指令?

非常感谢

.htaccess cache-control webp

6
推荐指数
1
解决办法
1560
查看次数

标签 统计

.htaccess ×1

cache-control ×1

webp ×1