How to cache my favicon
Im trying to make my favicon cacheable as yslow suggets.
My favicon is http://www.tucoaster.com/favicon.ico
For some reason, the content type of the favicon is text/plain. I'm using apache2, and in my .htaccess i have
ExpiresByType text/plain "access plus 30 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType image/ico开发者_JS百科 "access plus 30 days"
Note: Javascript and css headers are sent ok.
Any suggestion?
Apache may not know the right MIME type for the ICO format.
Try adding
AddType image/x-icon .ico
before the ExpiresByType
directives.
精彩评论