How to Specify “Vary: Accept-Encoding” header in .htaccess

前端 未结 7 1349
情话喂你
情话喂你 2020-12-12 10:34

Google PageSpeed says I should \"Specify a Vary: Accept-Encoding header\" for JS and CSS. How do I do this in .htaccess?

7条回答
  •  青春惊慌失措
    2020-12-12 11:05

    To gzip up your font files as well!

    add "x-font/otf x-font/ttf x-font/eot"
    

    as in:

    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml x-font/otf x-font/ttf x-font/eot
    

提交回复
热议问题