【发布时间】:2011-12-12 12:34:27
【问题描述】:
谷歌页面速度插件通知我:
The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header:
//some .js and .css files
我不明白这是什么意思。我已经像这样压缩了这些文件:
if (encodings.Contains("gzip") || encodings == "*")
{
app.Response.Filter = new GZipStream(baseStream, CompressionMode.Compress);
app.Response.AppendHeader("Content-Encoding", "gzip");
}
这一切似乎都奏效了。为什么需要Vary: Accept-Encoding?
【问题讨论】:
标签: c# asp.net http-headers