View Full Version : what is an ETag and how does it work?
  
Theomax
07-15-2017, 03:44 AM
An ETag is an opaque identifier allocated by a web server to a specific version of a resource found at a URL.  The ETag is a part of HTTP, the protocol for the world wide web and when the server reads the ETag from client request, the server can then tell whether to send the file (HTTP 200) or tell the client just to use their local copy (HTTP 304).
dennis123
07-17-2017, 02:49 AM
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at an URL. If the resource content at that URL ever changes, a new and different ETag is assigned.
In typical usage, when an URL is retrieved the web server will return the resource along with its corresponding ETag value, which is placed in an HTTP ?ETag? field:
ETag: "unique_id_of_resource_version"
The client may then decide to cache the resource, along with its ETag. Later, if the client wants to retrieve the same URL again, it will send its previously saved copy of the ETag along with the request in a "If-None-Match" field.
chrisgeitz
07-17-2017, 08:24 AM
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
astrodost
01-14-2019, 08:19 AM
An entity tag (ETag) is an HTTP header used for Web cache validation and conditional requests from browsers for resources. Etags use persistent identification elements (PIE) that have been tagged to the user's browser.
Easton234
01-14-2019, 11:36 AM
ETag is short for Entity Tag is a part of HTTP. HTTP offers numerous mechanisms for web cache validation and ETag is one of them. It permits caches to be more efficient, and saves bandwidth. If the content has not altered, a web server doesn't need to send a full response. Again, if the content has altered, Etags are convenient to assist to prevent simultaneous updates of a resources from overwriting each other.
softwaretesting
01-15-2019, 04:47 AM
Etag (entity tag) response header provides a mechanism to cache unchanged resources. It's value is an identifier which represents a specific version of the resource. Here's an example ETag header:
Etag:”version1”
Followings are the general high level steps where response header 'ETag' along with conditional request header 'If-None-Match' is used to cache the resource copy in the client browser:
    1. Server receives a normal HTTP request for a particular resource, say XYZ.
    2. The server side prepares the response. The server side logic wants the browser to cache XYZ locally. By default all browsers always cache the resources (specification) so no special header in the response is needed. 
    3. Server includes the header 'Etag' with it's value in the response:
        ETag: "version1"
       
    4. Server sends the response with above header, content of XYZ in the body and with the status code 200. The browser renders the resource and at the same time caches the resource copy along with header information.
    5. Later the same browser makes another request for the same resource XYZ. with following conditional request header:
       If-None-Match: "version1"
       
    6. On receiving the request for XYZ along with 'If-None-Match' header, the server side logic checks whether XYZ needs a new copy of the resource by comparing the current value of the ETag identifier on the server side and the one which is received in the request header.
davidweb09
01-15-2019, 02:43 PM
We use to locate the business website online through web server. https://weselltermlife.com/
 
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.