gpt4 book ai didi

apache - 从favicon.ico删除Etag

转载 作者:行者123 更新时间:2023-12-03 15:59:18 25 4
gpt4 key购买 nike

在项目上使用yslow我遇到了我无法解决的“问题”。

Yslow一直提示:

There is 1 component with misconfigured ETags http://www.domain.com/favicon.ico



我的.htaccess文件中包含以下内容
# 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

有人知道如何解决吗?

最佳答案

添加此:

ExpiresByType image/ico "access plus 1 years"

我的 .htaccess文件:
<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

关于apache - 从favicon.ico删除Etag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6197963/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com