HTTP: Generating ETag Header

后端 未结 7 1638
無奈伤痛
無奈伤痛 2020-12-05 14:16

How do I generate an ETag HTTP header for a resource file?

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 14:33

    From http://developer.yahoo.com/performance/rules.html#etags:

    By default, both Apache and IIS embed data in the ETag that dramatically reduces the odds of the validity test succeeding on web sites with multiple servers.

    ...

    If you're not taking advantage of the flexible validation model that ETags provide, it's better to just remove the ETag altogether.

提交回复
热议问题