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
14
votes
2 answers

Does the ETag header make the Cache-Control header obsolete? How to make sure Cache-Control is not harmful then?

Definition of ETag header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag): The ETag HTTP response header is an identifier for a specific version of a resource. It allows caches to be more efficient, and saves bandwidth, as a…
Blackbam
  • 17,496
  • 26
  • 97
  • 150
14
votes
1 answer

Python: How to check for RSS updates with feedparser and etags

I'm trying to skip over RSS feeds that have not been modified using feedparser and etags. Following the guidelines of the documentation: http://pythonhosted.org/feedparser/http-etag.html import feedparser d =…
Marc
  • 559
  • 1
  • 11
  • 26
14
votes
3 answers

Safari not sending "If-Modified-Since" and "If-None-Match" headers

I'm generating dynamic content with PHP. I'm sending the following HTTP-header: HTTP/1.1 304 Not Modified Date: Sun, 09 Dec 2012 17:24:41 GMT Server: Apache Connection: keep-alive, Keep-Alive Keep-Alive: timeout=1, max=100 Etag:…
basbebe
  • 567
  • 1
  • 9
  • 25
13
votes
4 answers

How do you make an etag that matches Apache?

I want to make an etag that matches what Apache produces. How does apache create it's etags?
Chris Bartow
  • 14,873
  • 11
  • 43
  • 46
13
votes
2 answers

eTag support using Alamofire 4

I am trying to enable eTag support in my app. I am using Alamofire 4 in my swift 3 project. It seems that eTag is transparently handled by URLRequest which Alamofire uses: NSURLCache and ETags But it doesn't work. Here is http header sent by web…
thierryb
  • 3,660
  • 4
  • 42
  • 58
13
votes
1 answer

ETag handling in Spring MVC REST

I am looking at switching from switching from Apache CXF RS with JAX RS to Spring MVC REST and see some problems with the way Spring MVC REST is currently handling ETags. Maybe I am not understanding right or there is a better way of achieving what…
JanDasWiesel
  • 382
  • 5
  • 14
13
votes
1 answer

nginx - missing etag when gzip is used

If I setup nginx to use gzip, it removes any etag header. The reasoning behind this is that the same resource cannot be byte-for-byte identical given that gzip has various compression levels. But nginx also removes a weak etag, which just means that…
arahant
  • 2,203
  • 7
  • 38
  • 62
13
votes
1 answer

In HTTP protocol what is the difference between ETag and Content-MD5?

Both represent a hashsum of the message body. Both can be used for checking if the resource was changed since the last time it was requested by a specific client. If they do identical thing, why do they coexist in the RFC2616 specification?
Archibald
  • 1,305
  • 1
  • 14
  • 19
12
votes
2 answers

How to turn off Etag with htaccess?

One of my friend says, etags on off mode for speed up page loading. How to off etags with htaccess?
Joshua
  • 419
  • 3
  • 7
  • 19
12
votes
3 answers

Caching a JSON response using ETag in a React Native app

What is the best way to implement the following scenario in a React Native app? Make an HTTP request to the server, get a JSON response and an ETag header. Save this JSON response in a way that will persist even after the app is restarted by the…
hattenn
  • 4,371
  • 9
  • 41
  • 80
12
votes
3 answers

What is the point of If-Unmodified-Since/If-Modified-Since? Aren't they superseded by ETags?

There seem to be two distinct ways to implement conditional requests using HTTP headers, both of which can be used for caching, range requests, concurrency control etc...: If-Unmodified-Since and If-Modified-Since, where the client sends a…
rewbs
  • 1,958
  • 4
  • 22
  • 34
12
votes
4 answers

Google Chrome does not revalidate etag on back/forth

Even though I send "cache-control: must-revalidate" Google Chrome uses a locally cached page when using the back and forth button in the browser. This is part of the original response: HTTP/1.1 200 OK cache-control: private, must-revalidate etag:…
Dennis
  • 3,448
  • 8
  • 38
  • 45
12
votes
3 answers

Is it possible to set ETags using JAX-RS without resorting to Response objects?

In one of the few questions (with answers) I have found on SO regarding JAX-RS and caching, the answer to generating ETags (for caching) is by setting some values on the Response object. As in the following: @GET @Path("/person/{id}") public…
oligofren
  • 20,744
  • 16
  • 93
  • 180
11
votes
6 answers

Why isn't my javascript & css caching?

It's appears ONLY javascript and css are not caching ... but images are caching. I am using Firebug and when I refresh the page, I notice in Firebug a lot of 200 HTTP responses for js/css but am receiving 304 HTTP codes (content not modified) for…
MrDoAlot
11
votes
1 answer

Android OkHttp how to handle ETag

I'm try to do Android offline caching method using OkHttp. The flow is like this: I send an HTTP request with an ETag empty string at header field if-none-catched to the server, and the server returns a proper ETag. Then I store the ETag and…
cloud
  • 173
  • 1
  • 2
  • 8
1 2
3
41 42