Conditional View Processing
Conditional View Processing
HTTP clients can send a number of headers to tell the server about copies of a resource that they have already seen. This is commonly used when retrieving a Web page (using an HTTP GET
request) to avoid sending all the data for something the client has already retrieved. However, the same headers can be used for all HTTP methods (POST
, PUT
, DELETE
, etc.).
For each page (response) that Django sends back from a view, it might provide two HTTP headers: the ETag
header and the Last-Modified
header. These headers are optional on HTTP responses. They can be set by your view function, or you can rely on the CommonMiddleware
<