Questions tagged [etag]

ETag is an HTTP Entity Tag. Use this tag if you have a question about HTTP requests using ETag, If-Match or If-None-Match headers, or the generation and comparison of ETag values.

An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL. If the resource content at that URL ever changes, a new and different ETag is assigned. Used in this manner ETags are similar to fingerprints, and they can be quickly compared to determine if two versions of a resource are the same or not.

http://en.wikipedia.org/wiki/HTTP_ETag

624 questions
26
votes
1 answer

Browser support for eTags

I'm working on getting my site to support the eTag/If-None-Match browser cache, but I'm not sure which browsers do/don't support it. Can anyone point me to a list? I can't imagine it's universal, but I haven't found anything that supports that…
Swift
  • 13,118
  • 5
  • 56
  • 80
26
votes
3 answers

Youtube API V3 and Etag

I use the youtube api v3 and i would like to understand how does the Etag. I would like to use it for what it takes to cache purpose but I do not know what to do in PHP. Could you tell me the steps to follow once the etag recovered ? please. Thanks…
Webmaster
  • 263
  • 1
  • 3
  • 6
25
votes
5 answers

Chrome is not sending if-none-match

I'm trying to do requests to my REST API, I have no problems with Firefox, but in Chrome I can't get the browser to work, always throws 200 OK, because no if-none-match (or similar) header is sent to the server. With Firefox I get 304 perfectly. I…
avances123
  • 2,224
  • 4
  • 21
  • 21
23
votes
2 answers

How to use etags in a PHP file?

How do you implemented etags inside a PHP file? What do I upload to the server and what do I insert into my PHP file?
Nagra
  • 1,529
  • 3
  • 15
  • 25
22
votes
3 answers

Cache validator for Google Webfonts

So I'm creating an ultra optimized site, and my page load speed with https://developers.google.com/speed/pagespeed/ is 99 (out of 100). The only thing keeping me away from full hundred is this: By specifying a cache validator - a Last-Modified or…
user1537415
21
votes
2 answers

How do I use ETag / If-Match with multiple items

The recommended way to handle optimistic locking in a RESTful interface seems to be by returning an ETag from the GET, and supplying an If-Match on the PUT, ie: GET /items/1 --> gives client an ETag for a single item PUT /items/1 <-- client gives…
stusmith
  • 14,003
  • 7
  • 56
  • 89
21
votes
2 answers

HTTP: max length of etag

Does the HTTP protocol specify a max length for the ETag?
flybywire
  • 261,858
  • 191
  • 397
  • 503
18
votes
1 answer

(Weak) ETags and Last-Modified

As far as I understand the specs, the ETag, which was introduced in RFC 2616 (HTTP/1.1) is a successor (of sorts) for the Last-Modified-Header, which is proposet to give the software-architect more controll over the cache-revalidating process. If…
Kai Moritz
  • 611
  • 2
  • 7
  • 19
17
votes
3 answers

Is there a Ruby http client library with a response cache?

Is there a Ruby http client library where responses are automatically cached by ETag and the If-Non-Match header applied to requests on previously used URLs?
joshuanapoli
  • 2,509
  • 3
  • 25
  • 34
17
votes
1 answer

Why isn't ETag alone enough to invalidate the browser cache?

I've read a lot of related articles on the matter and also the very good article about HTTP caching…
AsGoodAsItGets
  • 2,886
  • 34
  • 49
17
votes
2 answers

NSURLCache and ETags

Does NSURLCache transparently handle ETags received by server? I mean: does it automatically store ETags for each URL request and then send the appropriate If-None-Match when a request to the same URL is submitted? Or do I have to manage it by…
Sirio
  • 991
  • 2
  • 12
  • 27
16
votes
2 answers

Why Different Etags for Different Representations of the Same Resource?

I understand the use of etags for optimistic concurrency control (e.g. in a RESTful style of architecture), and I've read that etags should be different for different representations of the same resource. Why is that? Ultimately aren't we interested…
erturne
  • 1,799
  • 1
  • 15
  • 29
16
votes
4 answers

ETag and If-None-Match HTTP Headers are not working

I have a file in my webserver and I am downloading that to my app everytime I access it because its possible that file content might be changed But If it is changed I would like to download that time only so bandwidth can be saved and fortunately…
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
16
votes
3 answers

Retrofit ETAG and Caching

Is there a proper explanation on how to add caching and ETAG/If-None-Match support to Retrofit+OkHttp? I'm struggling to add Etag support on 2 projects, and at first I suspected that there might be an issue with HTTP headers, another project has…
AAverin
  • 3,014
  • 3
  • 27
  • 32
14
votes
3 answers

How do I generate an http ETag in c#?

Given a file being returned as part of a http request. What is the correct method of creating an ETag for that file? http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 I have seen it done several ways Using the last write time of the…
Simon
  • 33,714
  • 21
  • 133
  • 202
1
2
3
41 42