Remove Etag from favicon.ico

核能气质少年 提交于 2019-12-03 15:31:45
Yavane

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!