HTTP Learning (ii)

Source: Internet
Author: User

The header field is used to provide the browser and server with the message body size, language used, authentication information, etc.

4 Types of header fields

Generic header Field

Request Header Field

Response Header Field

Entity header Field

Detailed Description:

HTTP header field type
  • Generic header field: The header that both the request and response messages will use
    | header Field Name | description |
    |---|---|
    | cache-control| Control Caching Behavior |
    | connection| Hop Header, Connection management |
    | date| Date and time the message was created |
    | pragma| Message Instruction |
    | trailer| header at the end of the message list |
    | Transfer-encoding| specifying the transmission encoding of the message body |
    | Upgrade| upgrade to other protocols |
    | Information about the via| Proxy Server |
    | Warning| Error Notification |
  • Request Header Field
    | header Field Name | description |
    |---|---|
    | Accept| media types that the user agent can handle |
    | Accept-charset| Preferred Character Set |
    | Accept-encoding| Priority Content Coding |
    | Accept-language| Preferred Language |
    | authorization| Web Certification Information |
    | Expect| expecting server specific behavior |
    | e-mail address for from| users |
    | Host| the server where the resource is requested |
    | if-match| Compare Entity tags ( ETag ) |
    | if-modified-since| update time for comparison resources |
    | If-none-match| Comparing Entity tags (with If-Match opposite) |
    | Send entity's range request when if-range| resource is not updated Byte |
    | if-unmodified-since| update time for compare resources (with If-Modified-Since opposite) |
    | max-forwards| Maximum Transmission Hop-by-jump |
    | proxy-authorization| Proxy Server requires authentication information for clients |
    | Byte range request for range| entity |
    | referer| to URI the original acquiring party in the request |
    |te| priority of transmission encoding |
    | User-agent| priority of transmission encoding |
  • Response Header Field
    | header Field Name | description |
    |---|---|
    | Whether the accept-ranges| accepts byte range requests |
    | Age| Estimating Resource creation Elapsed Time |
    | Matching information for etag| resources |
    | location| REDIRECT client to specified URI |
    | Proxy-authenticate| Proxy Server Authentication information for clients |
    | retry-after| time requirement for re-launch request |
    | server| Installation information for HTTP Server |
    | vary| Management information for proxy Server caching |
    | www-authenticate| server-to-Client authentication information |
  • Entity header field: Header used for the entity portion of the request message and response message
    | header Field Name | description |
    |---|---|
    | HTTP methods supported by the allow| resource |
    | Content-encoding| the code used by the entity body |
    | Content-language| natural Language for entity bodies |
    | content-length| the size of the entity body (units: bytes) |
    | content-location| substitution of corresponding resources URI |
    | content-md5| Abstract of Entity body |
    | content-range| the position range of the entity body |
    | content-type| the media type of the entity body |
    | expires| entity principal expires Date Time |
    | last-modified| Resource Last Modified date Time |
The header field for the Cookie service
      • Cookiethe header field for the service
        | header Field Name | description |
        |---|---|
        | set-cookie| Start state Management usage Cookie Information |
        | Information received by the cookie| server Cookie |
      • Set-CookieProperties of the field
        | header Field Name | description |
        |---|---|
        |name=value| assigned Cookie name and its value (required) |
        |expires=date| Cookie Expiration date (default is until the browser is closed if not explicitly specified) |
        |path=path| the file directory on the server as Cookie the applicable object (default is the file directory where the document is located if not specified) |
        |domain= Domain name | As the Cookie domain name of the applicable object (default is the domain name of the server created if not specified Cookie ) |
        | Secure| is only HTTPS sent when secure communication Cookie |
        | Httponly| is restricted so that it Cookie cannot be JavaScript accessed by script |

HTTP Learning (ii)

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.