HTTP protocol Response Code

Source: Internet
Author: User

Response code

The response header is important to the browser, which illustrates the true meaning of the Response. For example, 200 indicates that the response was successful and 302 indicates redirection, which means the browser needs to send a new request Again.

L 200: the request succeeds, the browser will display the response body content (usually Html) in the browser;

L 404: The requested resource was not found, indicating that the client failed to request a resource that does not exist;

L 500: the request resource was found, but there was an error inside the server;

L 302: redirect, When the response code is 302, indicates that the server requires the browser to resend a request, the server sends a response header location, which specifies the URL address of the new request;

L 304: When the user first requests index.html, The server adds a response header called last-modified, which describes the last modification time of the index.html, and the browser caches the index.html content and the last response Time. When the user requests index.html the second time, the request contains a header named if-modified-since, which is the value of the first request when the server responds to the value of the browser by last-modified, that is, index.html last modified time, If-modifie D-since the request header is telling the server, I am here browser cache index.html Last modified time is this, you see now index.html last modified time is not this, if still, then you will not have to respond to this index.html content, I will be the content of the cache directly Displayed. The server side will get the if-modified-since value, and index.html the current last modified time, if the same, the server will send a response code 304, indicating that index.html is the same as the last cache of the browser, no need to send again ( Save the transfer cost ), the browser can display its own cache page, if the comparison is different, then the index.html has been modified, the server will respond 200.

Related Article: http://blog.csdn.net/u012110719/article/details/46324191

HTTP protocol Response Code

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.