如何统一负载均衡环境中IIS的Etag值以提高访问速度

来源:互联网 发布:ipad2软件下载 编辑:程序博客网 时间:2024/05/16 12:12

在IIS中etag的构成是 filetimestamp:changenumber 。

若WEB服务是多个IIS服务器负载均衡构成,那么就要统一所有IIS服务器的 changnumber,否则即便是访问资源的时间戳是一样的,由于 changnumber 不同,合成的 Etag 还是不同,导致web服务器有可能不能返回 HTTP/1.x 304 Not Modified 。以致不能利用本地缓存。

查看 changnumber 的命令是:

Mdutil.exe get w3svc -prop 2039

修改 changnumber 的命令是:

Mdutil.exe set w3svc -prop 2039 -value "entitytagvalue"

参考:http://support.microsoft.com/kb/922733/en-us/

          http://developer.yahoo.com/performance/rules.html

          http://hi.baidu.com/webwatch/blog/item/65a6c9cbc4c8ddf552664ffc.html

          http://hi.baidu.com/dianhui/blog/item/7a964faf39551af3fbed5093.html

原创粉丝点击