What is the use of Django setting the ETag header?

1.9k Views Asked by At

What is the ETag header, why does Django set it and how should I use it?

1

There are 1 best solutions below

1
On BEST ANSWER

An ETag, or entity tag, is part of HTTP, the protocol for the World Wide Web. It is one of several mechanisms that HTTP provides for cache validation, and which allows a client to make conditional requests.

Source.

Basically, you do a md5 or something of the file, and if the file changes, the ETags do not match and the browser can download a new copy.