Questions tagged [etags]

Entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser's cache matches the one on the origin server.

Entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser's cache matches the one on the origin server. ETags were added to provide a mechanism for validating entities that is more flexible than the last-modified date.

20 questions
20
votes
7 answers

yslow says etags are misconfigured. how to configure etags properly on IIS7?

running ySlow on a website I support, I noticed it reported that the etags are misconfigured for the site images (e.g. *.jpg, *.png, *.gif). Can anyone help explain what I have to do to get IIS7 issuing these etags correctly ?
MikeJ
  • 1,381
  • 4
  • 13
  • 24
10
votes
1 answer

When should you use and not use Etags?

I was just looking at our site on WebPageTest.org and one of their recommendations for speeding up a website is: ETag headers should generally not be used unless you have an explicit reason to need them I was wondering what this means. Does it…
Django Reinhardt
  • 2,256
  • 3
  • 38
  • 55
8
votes
5 answers

Which reverse-proxies support HTTP/1.1 ETag and If-None-Match headers?

I'm developing a caching system for an ecommerce platform that will use a reverse proxy for caching. I plan to handle invalidation by using proper HTTP/1.1 headers. That is, I will set an ETag on first generation of the content and cache that ETag…
ColinM
  • 691
  • 8
  • 19
6
votes
1 answer

RFC 2616 with Apache 2.4

I'm using Apache 2.4.3 as a reverse proxy due to it's advertised compliance with RFC 2616. My app uses headers like this to enable caching at the proxy: Cache-Control: public, s-maxage=0 Expires: ... (+1 day) X-Group: A Vary: X-Group ETag:…
ColinM
  • 691
  • 8
  • 19
6
votes
1 answer

Nginx sending 2 Cache-Control headers

Iam serving my static content with ngnix. location /static { alias /opt/static/blog/; access_log off; etags on; etag_hash on; etag_hash_method md5; expires 1d; add_header Pragma "public"; …
optixx
  • 216
  • 2
  • 7
4
votes
2 answers

What are the benefits and drawbacks of using ETag vs LastModified as a CDN cache validator?

I'm reading this article on Azure CDN. I can either control caching with: An ETag Last Modified Default heuristics What are the benefits and drawbacks of the first two choices? Does it matter? Places where one might work vs the other could…
makerofthings7
  • 8,821
  • 28
  • 115
  • 196
4
votes
1 answer

How do Proxies handle ETags?

I use ETags to improve performance. I decided to use an Etag that is valid on Server, Client and Proxy. But how is this handled if the proxy has saved the ETag? Does the Proxy still ask the website if the ETag is valid or does the proxy itself just…
user107250
4
votes
1 answer

How to disable ETag headers in Tomcat

Tomcat seems to send an ETag header with each response by default. I'd like to disable these for reasons outlined here. I know I can strip them out in my Apache configuration, but is there any way to disable them on the Tomcat side?
Ben Williams
  • 2,318
  • 4
  • 21
  • 17
4
votes
0 answers

Client-side caching when using CSP with nonces in nginx - how do you use weak caching validators/etags?

I'm using nginx's expires directive; its etag directive as well as the Last-Modified header (if I understand correctly) are on by default. In order to allow specific inline JavaScripts when using restrictive Content Security Policy (CSP) headers…
2
votes
1 answer

What strategy should I use for Apache HTTP Server so that newly deployed files have their cache invalidated?

A very common solution is to do the following: FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires…
user11958
2
votes
2 answers

disable etag in IIS 7

Does anyone know how I can disable ETag on IIS 7?
Chirag
  • 261
  • 4
  • 11
2
votes
1 answer

Which static file types does Nginx generate ETags for by default?

In modern versions of Nginx, the ETag is automatically generated for static file types, even if you don't specifically enable the etag on in your location blocks or otherwise: https://nginx.org/en/docs/http/ngx_http_core_module.html#etag For…
Jesse Nickles
  • 250
  • 1
  • 12
1
vote
1 answer

Can Squid automatically add ETag?

Can Squid automatically add ETag based on page content, for the client not to download the same page twice?
porton
  • 312
  • 1
  • 14
1
vote
1 answer

What is Apache's purpose in putting inodes into ETags?

There are plenty of articles on the web detailing why you might not want to use Apache's default inode-mtime-size format for ETags (see e.g. here or here). All such articles recommend the same thing: remove inodes from your ETags. But I have yet to…
hatfinch
  • 113
  • 5
1
vote
2 answers

Apache Caching and Expires configuration

I'm looking for a best possible caching/expires configuration for my specific situation. I realize that some sites have advocated turning etags off: Header unset ETag, FileETag None I know that I should use either Expires or Cache-Control. In…
mcondiff
  • 151
  • 1
  • 8
1
2