Parsing an HTTP request returns a 304 status code

Source: Internet
Author: User
Tags browser cache chrome tools

Hello everyone, today to share a status code 304, you may have been in the previous development of chrome tools or Firebug tool to intentionally or inadvertently see it.



HTTP 304:not Modified
The standard explanation is that the not Modified client has a buffered document and makes a conditional request (typically providing a if-modified-since header indicating that the customer only wants to update the document over the specified date). The server tells the customer that the original buffered document can continue to be used.
Such as:

In the request head there are: If-modified-since:mon, 01:53:41 GMT

In the response, there are: Last-modified:mon, 01:53:41 GMT

Let's compare these two dates and minutes and seconds are exactly the same, and if you get the content from the cache in a consistent way

We saw in the picture a It Cache-control
If the Cache-control:no-chache description forces each request to be sent directly to the source server, without the checksum of the locally cached version.
If there are two cases of cache-control:max-age=0:
1, max-age>0 directly from the browser cache to extract
2, max-age<=0 to the server to send an HTTP request confirmation, whether the resource has been modified to return 200, no words return 304.

First time Visit 200
Mouse click two times Access (Cache)
Press F5 to refresh 304
Press Ctrl+f5 to force refresh 200

Reprinted from: http://blog.csdn.net/itpinpai/article/details/48181849

Parsing an HTTP request returns a 304 status 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.