今天一个朋友问我能不能帮忙做一个自动投票系统.
打开要投票的网站通过iehttpheaders查看header时,发现了Etag.
google了下发现了关于Etag的解释.主要是关于Etag与Last-Modified之间的区别。
-------------------------------------------------------------
The ETag response-header field provides the current value of the entity tag for the requested variant......Entity tags are normally "strong validators," but the protocol provides a mechanism to tag an entity tag as "weak." One can think of a strong validator as one that changes whenever the bits of an entity changes, while a weak value changes whenever the meaning of an entity changes. Alternatively, one can think of a strong validator as part of an identifier for a specific entity, while a weak validator is part of an identifier for a set of semantically equivalent entities.
-------------------------------------------------------------
ETags and Last-Modified headers are two ways that feed publishers can save bandwidth, but they only work if clients take advantage of them. Universal Feed Parser gives you the ability to take advantage of these features, but you must use them properly.
The basic concept is that a feed publisher may provide a special HTTP header, called an ETag, when it publishes a feed. You should send this ETag back to the server on subsequent requests. If the feed has not changed since the last time you requested it, the server will return a special HTTP status code (304) and no feed data.
看来主要是为了减轻服务器负担和响应速度而采用的一个header TAG.花点时间具体研究下.