Request header (request) and response header (response)

What are the common request headers and corresponding headers?

1) Request (client -> server [request]) 

    GET (request method) /newcoder/hello.html (requested target resource) HTTP/1.1 (requested protocol and version number) 

    Accept: */* (resource types that the client can receive) 

    Accept-Language: en-us (language type received by the client) 

    Connection: Keep-Alive (maintain the connection between the client and the server) 

    Host: localhost:8080 (connected target host and port number) 

    Referer: http://localhost/links.asp (tell the server where I am from) 

    User-Agent: Mozilla/4.0 (the name of the client version number) 

    Accept-Encoding: gzip, deflate (the type of compressed data that the client can receive) 

    If-Modified-Since: Tue, 11 Jul 2000 18:23:51 GMT (cached time)  

    Cookie (client temporarily stores server-side information) 

    Date: Tue, 11 Jul 2000 18:23:51 GMT (the time when the client requests the server)

2) Response (server -> client [response])

    HTTP/1.1 (response protocol and version number) 200 (status code) OK (description information)
    Location: http://www.baidu.com (the page path that the server needs to access by the client) 
    Server: apache tomcat (web server name of the server)
    Content-Encoding: gzip (the server can send the compression encoding type) 
    Content-Length: 80 (the length of the compressed data sent by the server) 
    Content-Language: zh-cn (service The language type sent by the client) 
    Content-Type: text/html; charset=GB2312 (the type sent by the server and the encoding method used)
    Last-Modified: Tue, 11 Jul 2000 18:23:51 GMT (the server Last modified time)
    Refresh: 1;url=http://www.it315.org(The server requires the client to refresh after 1 second, and then access the specified page path)
    Content-Disposition: attachment; filename=aaa. zip (the server requires the client to open the file by downloading the file)
    Transfer-Encoding: chunked (transfer data to the client in chunks)  
    Set-Cookie: SS=Q0=5Lb_nQ; path=/search (send the server to the client Temporary data on the client side)
    Expires: -1//3 kinds (the server side prohibits the client from caching page data)
    Cache-Control: no-cache (the server side prohibits the client from caching page data)  
    Pragma: no-cache (the server side prohibits the client from caching the page data) side cache page data)   
    Connection: close(1.0)/(1.1) Keep-Alive (maintain the connection between the client and the server)  

    Date: Tue, 11 Jul 2000 18:23:51 GMT(服务端响应客户端的时间)

在服务器响应客户端的时候,带上Access-Control-Allow-Origin头信息,是解决跨域的一种方法。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325521842&siteId=291194637