我正在尝试改进我的博客的杠杆浏览器缓存,所以我在我的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 1 day”
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
但它似乎没有起作用。当我运行gtmetrix时,我仍然得到这个:
The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:
http://kaye.at/img/11/11-month-update.jpg (expiration not specified)
http://kaye.at/img/11/archie-and-cousin-caitlin.jpg (expiration not specified)
http://kaye.at/img/11/archie-and-nanny-bailey.jpg (expiration not specified)
http://kaye.at/img/11/archie-and-nanny.jpg (expiration not specified)
http://kaye.at/img/abc/h@2x.png (expiration not specified)
http://kaye.at/img/anchorlogodark.png (expiration not specified)
http://kaye.at/img/confetti.png (expiration not specified)
https://gwc.lphbs.com/0/lpg/msg (expiration not specified)
http://use.typekit.net/eev2aks.js (10 minutes)
http://connect.facebook.net/en_GB/sdk.js (20 minutes)
http://www.google-analytics.com/analytics.js (2 hours)
http://www.google-analytics.com/ga.js (2 hours)
http://helloarchie.blue/themes/tootsweet/css/base.css (1 day)
http://helloarchie.blue/themes/tootsweet/css/layout.css (1 day)
http://helloarchie.blue/themes/tootsweet/css/skeleton-fluid.css (1 day)