Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can somebody explain me what is the use of "etag" in django? [closed]

I am confused with the etag mechanism. If anyone could explain it, would be a big help

like image 498
Vivekraj Nyamgouda Avatar asked Oct 11 '25 15:10

Vivekraj Nyamgouda


1 Answers

So first lets separate etags from django/python. The concept of etags, lives independently of any programming language. It is actually part of HTTP.

Simply put etags are part of the way one might go about implementing a web cache. Basically the server returns an ETag header which is a hash that represents the state of a resource. The client can then send that hash value to the server which can perform a check, if it matches then the cache the client has is still valid 304. If the values are different then the server would send a full response back to the client.

Basically outlined on Wiki :)

like image 134
Kirill Fuchs Avatar answered Oct 14 '25 04:10

Kirill Fuchs