HTTP Conditional Request

Source: Internet
Author: User

Conditional Request If-modified-since/if-unmodified-since/if-none-match/if-match/if-range for HTTP
      • If-modified-since
        is a standard HTTP request header tag that, when sending an HTTP request, sends the last modification time (last-modified) of the browser-side cache page to the server, which compares the time to the last modification time of the actual file on the server.
        If the time is consistent, then return the HTTP status Code 304 (do not return the contents of the file), after the client receives, the local cache file is displayed directly to the browser.
        If the time is inconsistent, the HTTP status code 200 and the new file contents are returned, and when the client receives it, it discards the old file, caches the new file, and displays it in the browser.
      • If-unmodified-since
        When sending an HTTP request, the last modification time (last-modified) of the browser-side cache page is sent to the server, and the server compares the time to the last modification time of the actual file on the server.
        If time is consistent, return to HTTP status Code 200 and start transferring files
        Returns 412 Precondition failed (preprocessing error) if time is consistent
      • If-none-match
        When sending an HTTP request, the server previously sent the ETag, and the server responded to the etag to determine whether the change
        Returns 304 if the ETag is the same
        If the etag is different, response 200 returns the request file
      • If-match
        When sending an HTTP request, the server previously sent the ETag, and the server responded to the etag to determine whether the change
        If the etag is the same, response 200 returns the request file
        If the etag is different, then you need to return 416 (range not satisfiable, the scope request cannot be satisfied)
      • If-range
        If the response data is not changed, the server sends the missing portion of the client, otherwise the entire data is sent.

HTTP Conditional Request

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.