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
6
votes
5 answers

why is etags generating a corrupted TAGS file?

I have the following minimal source file: $ cat path/xx/yy/fooBar.c void this_is_a_test(void) { } If I run etags like this it works ok: $ etags path/xx/yy/fooBar.c $ cat TAGS path/xx/yy/fooBar.c,25 void this_is_a_test(1,0 But if I run etags…
bstpierre
  • 30,042
  • 15
  • 70
  • 103
6
votes
2 answers

PHP setting Etag reliably

im having trouble setting the Etag on a user's browser reliably. When a user clicks on one of my external links, i would like to set the article id into their Etag (i use cookies too, but id like to experiment with Etag specifically to test its…
Peter John
  • 1,859
  • 4
  • 15
  • 14
6
votes
3 answers

Etags used in RESTful APIs are still susceptible to race conditions

Maybe I'm overlooking something simple and obvious here, but here goes: So one of the features of the Etag header in a HTTP request/response it to enforce concurrency, namely so that multiple clients cannot override each other's edits of a resource…
Metalstorm
  • 2,940
  • 3
  • 26
  • 22
6
votes
1 answer

Generating ETAG using spring boot

I'm new to spring boot. I want to generate ETAG whenever perform a POST from my controller class. Below is the configuration class created: @Configuration public class WebConfiguration { @Bean public Filter shallowEtagHeaderFilter() { …
user873888
  • 83
  • 1
  • 2
  • 4
6
votes
2 answers

Which is more reliable for Github API Conditional Requests, ETag or Last-Modified?

The Github API specifies two headers that can be used in Conditional Requests, Last-Modified and ETag. Which is the more reliable when querying the API? For context: when using the api endpoint GET /repos/:owner/:repo/git/trees/:sha on each subdir…
unboundev
  • 357
  • 1
  • 11
6
votes
2 answers

What is the difference between Etag and Expires header?

I know this question is asked for several times. But Still I am not clear about the concept. After reading many blogs and answers in SO what I got is, Expiry headers are used when you don’t even want client (and proxies/caches) to make a request to …
user3427540
  • 1,162
  • 1
  • 14
  • 30
6
votes
2 answers

How to access ETag header with jQuery AJAX request?

I'm using a jQuery ajax call to request data from a server that is sending an ETag in the HTTP response headers. I need access to the header, but when the request succeeds and I call jqXHR.getAllResponseHeaders(), I only see a subset of the headers…
Swaraj
  • 1,235
  • 1
  • 13
  • 22
6
votes
2 answers

curl will not return while performing a HEAD request

I am creating resources on a node server and attaching an ETag to each one of them. I am using the method found in this question What encoding should I use to properly generate an ETag with crypto in nodeJS? for generating the ETags. However, when I…
MightyMouse
  • 13,208
  • 8
  • 33
  • 43
6
votes
1 answer

ETags, IIS7, Kernel Cache Policy (enableKernelCache)

Two-part question (parts are closely related): with the default OOTB ETag policy that IIS7 employs, why don't we see the If-None-Match/304 interaction as we navigate through pages? The headers returned for an empty-cache request, for instance,…
Nariman
  • 6,368
  • 1
  • 35
  • 50
6
votes
1 answer

Should HTTP ETags be case sensitive?

I'm creating a library for handling client caching over HTTP on a web server (i.e., handling of If-Match, If-Modified-Since, If-None-Match, and If-Unmodified-Since HTTP headers), and I'm working on ETags (entity tags) at the moment. My question is…
Rick
  • 1,863
  • 2
  • 19
  • 46
6
votes
2 answers

Emacs: How to generate etags for coffeescript?

I just found the coffeetags tool and can confirm that it works with vim. Is there something similar for Emacs? Has anyone managed to get etags working for Emacs with coffeescript?
Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239
6
votes
1 answer

What encoding should I use to properly generate an ETag with crypto in nodeJS?

In my nodeJS app, I'd like to generate ETags for all the content that I return to the client. I need the ETag to be based off the actual content of the file instead of the date, so that the same file across different node processes has the same…
thisissami
  • 15,445
  • 16
  • 47
  • 74
6
votes
3 answers

How to show function prototype in Emacs?

While in C-mode I can jump to a function using M-. on the function name....is there a way i can simply display the function prototype? (preferably as a tooltip or so) I often struggle to remember the exact order and types required by a given…
horseyguy
  • 29,455
  • 20
  • 103
  • 145
5
votes
1 answer

How to cache a HTML page with must-revalidate?

When caching a HTML page with must-revalidate, this means that browser must check for any update defined by Last-Modified or Etag. However, the problem is that before max-age, browser will not make any connection with the website to read HTTP…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
5
votes
1 answer

Rails' stale? method for sitemap always returns HTTP 200

My Ruby on Rails application uses the following controller code to generate a sitemap.xml file: class SitemapController < ApplicationController layout nil def index headers['Content-Type'] = 'application/xml' last_post = Post.last …
John Topley
  • 113,588
  • 46
  • 195
  • 237