YSlow:HTTP标头中没有指定字符集

时间:2014-01-28 19:22:09

标签: .htaccess

The following resources have no character set specified in their HTTP headers. 
Specifying a character set in HTTP headers can speed up browser rendering.

http://www.mysite.com/assets/fonts/Roboto/Roboto300.woff
http://www.mysite.com/assets/fonts/Roboto/Roboto700.woff
http://www.mysite.com/assets/fonts/font-awesome/fontawesome-webfont.woff

如何通过.htaccess修复它?

1 个答案:

答案 0 :(得分:8)

尝试在.htaccess中添加以下两行:

AddDefaultCharset UTF-8
AddCharset UTF-8 .htm .html .css .js .woff