Remove Etag from favicon.ico
using yslow on a project I am experiencing a "problem" I can not solve.
Yslow keeps complaining:
There is 1 component with misconfigured ETags http://www.domain.com/favicon.ico
I have the following in my .htaccess file
开发者_如何学Go# Add Proper MIME-Type for Favicon
AddType image/x-icon .ico
# Enable Apache's mod_expires Module
ExpiresActive On
ExpiresByType image/x-icon "access plus 6 month"
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
Does anybody have an idea how to fix it?
Add this:
ExpiresByType image/ico "access plus 1 years"
My .htaccess
file:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/ico "access plus 1 years"
</IfModule>
Header unset ETag
FileETag None
Hmmm. this did not fix the issue for me in Drupal ( 7 ).
Adding these lines to my .htaccess
file:
ExpiresActive On
ExpiresByType image/x-icon A604800
Also added this line to my apache http config: (but can also be in your .htaccess file)
FileETag None
And i disabled the icon / default icon on the admin/appearance/settings/[theme_name] page.
And finally copied the favicon.ico file to my site root and this DID fix this problem for me.
Kinda looks like something is wrong in Drupal here? :/
none above helped for me but this works excellent:
<FilesMatch "favicon.ico">
Header unset ETag
FileETag None
</FilesMatch>
精彩评论