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
372
votes
8 answers

ETag vs Header Expires

I've looked around but haven't been able to figure out if I should use both an ETag and an Expires Header or one or the other. What I'm trying to do is make sure that my flash files (and other images and what not only get updated when there is a…
GeoffreyF67
  • 11,061
  • 11
  • 46
  • 56
85
votes
12 answers

How do I remove eTag headers from IIS7?

Per Yahoo's best practices for high performance web sites, I'd like to remove Etags from my headers (I'm manually managing all my caching and have no need for Etags... and when/if I need to scale to a farm, I'd really like them gone). I'm running…
Brent Broome
84
votes
3 answers

What takes precedence: the ETag or Last-Modified HTTP header?

For two subsequent requests, which of the following two headers is given more weight by browsers should one of them change: ETag or Last-Modified?
user101442
  • 2,517
  • 3
  • 20
  • 12
73
votes
2 answers

how does a etag work in expressjs

Expressjs automatically send etags. I would like to know how the etag is generated..is it based on the content that is generated dynamically by the get routine. or is there way I can mainpulate it, by not even going through the process of generating…
coool
  • 8,085
  • 12
  • 60
  • 80
66
votes
5 answers

How to prevent request that returns 304

When does a browser NOT make a request to the server for a file? In other words, I have a JavaScript file being served. Its HTTP response header has an ETag, Cache-Control: public, and Expires: Tue, 19 Jan 2038 03:14:07 GMT. The server is returning…
core
  • 32,451
  • 45
  • 138
  • 193
65
votes
2 answers

How do I support ETags in ASP.NET MVC?

How do I support ETags in ASP.NET MVC?
Patrick Gidich
  • 1,127
  • 1
  • 8
  • 12
56
votes
3 answers

Should HTTP 304 Not Modified-responses contain cache-control headers?

I've tried to understand this, and searched SO for similar questions, but I still don't have a 100% understanding on how this is supposed to work. I get this response on a request for an image resource: Response Headers Server …
runarM
  • 1,601
  • 1
  • 15
  • 21
50
votes
4 answers

Getting ETags right

I’ve been reading a book and I have a particular question about the ETag chapter. The author says that ETags might harm performance and that you must tune them finely or disable them completely. I already know what ETags are and understand the…
Pablo Fernandez
  • 103,170
  • 56
  • 192
  • 232
46
votes
2 answers

Which one to use : Expire Header, Last Modified Header or ETags

I am running PHP on Apache, and am confused about how to implement server-side caching, in order to make the site load faster. What is the difference between the Expires, Last-Modified and ETag headers, and which one should be used in what…
Avinash
  • 6,064
  • 15
  • 62
  • 95
36
votes
2 answers

How to enable ETag headers on Nginx for static files?

I'm using Nginx as a webserver and want to implement a browser caching method so that the users keep copies of static, unchanged files locally and download only changed files. One of the propositions was to use the file's timestamp to figure out the…
HanouaJ
  • 361
  • 1
  • 3
  • 4
31
votes
7 answers

HTTP: Generating ETag Header

How do I generate an ETag HTTP header for a resource file?
tags2k
  • 82,117
  • 31
  • 79
  • 106
30
votes
4 answers

Syntax for ETag?

Redbot reports that my webpage has invalid header: The ETag header's syntax isn't valid. My headers are set to: ETag: 4ae413bd Why is it invalid? What is the syntax for an ETag?
Pacerier
  • 86,231
  • 106
  • 366
  • 634
30
votes
4 answers

Create ETag filter in ASP.NET MVC

I would like to create an ETag filter in MVC. The problem is that I can't control the Response.OutputStream, if I was able to do that I would simply calculate the ETag according to the result stream. I did this thing before in WCF but couldn't find…
anativ
  • 433
  • 1
  • 5
  • 12
28
votes
2 answers

IIS 7.5 remove etag headers from response

I know this question has been asked alot of times, however most of them were in 2009-2010. I am pretty sure a while back a project I was working on removed them, however I cannot find any way to remove them at the moment. So has there been any…
Grofit
  • 17,693
  • 24
  • 96
  • 176
28
votes
6 answers

What's the best way to create an etag?

What's a good method of programatically generating etag for web pages, and is this practice recommended? Some sites recommend turning etags off, others recommend producing them manually, and some recommend leaving the default settings active -…
Rich Bradshaw
  • 71,795
  • 44
  • 182
  • 241
1
2 3
41 42