WCF REST ETag 属性

发布于 2024-12-18 03:00:01 字数 60 浏览 5 评论 0原文

在阅读 WCF REST 服务时,我多次遇到 ETag。

它们是什么以及它们的用途是什么?

I have come across ETag many times when reading about WCF REST services.

What are they and what are they used for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野心澎湃 2024-12-25 03:00:01

ETag 值是一个标识符。

MSDN

实体标签(或 ETag)是 HTTP 缓存机制的一个重要方面。 ETag 是一个不透明的带引号的字符串,可以与 ETag HTTP 标头中的响应一起返回。 ETag 用于指示资源是否已更改状态。如果对同一资源的两个请求导致响应具有相同的 ETag,则可以假设资源的状态在两个请求之间没有更改。

The ETag value is an identifier.

It is explained pretty well on MSDN:

Entity Tags (or ETags) are a crucial aspect of the caching mechanisms in HTTP. An ETag is an opaque quoted string that may be returned along with a response in an ETag HTTP header. ETags are used to indicate whether or not a resource has changed state. If two requests for the same resource result in responses with the same ETag then it can be assumed that the state of the resource has not changed between the two requests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文