HTTP response last-modified and ETag

Source: Internet
Author: User

Smart developers will use the HTTP header for Last-modified and ETAGS requests, which can take advantage of caching by clients such as browsers. Because the server first generates the LAST-MODIFIED/ETAG tag, the server can later use it to determine if the page has been modified. Essentially, the client requires the server to validate its (client) cache by passing the token back to the server.
The process is as follows:

    1. The client requests a page (a).
    2. The server returns page A and adds a last-modified/etag to a.
    3. The client presents the page and caches the page along with Last-modified/etag.
    4. The customer requests page A again and passes the Last-modified/etag that the server returned when the last request was sent to the server.
    5. The server checks the last-modified or ETag and determines that the page has not been modified since the last client request, directly returning the response 304 and an empty response body.

HTTP response last-modified and ETag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.