【发布时间】:2015-01-17 22:47:40
【问题描述】:
我目前在我的 .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>
我是否还需要在我的页面上添加Cache-Control 元标记才能应用这些规则?即
<meta http-equiv="Cache-control" content="public">
【问题讨论】:
标签: css html .htaccess caching