The RSS request of the blog site does not support Last-Modified.

Source: Internet
Author: User

During the test of reading RSS, I used my own RSS link in the blog garden for the test. I found that when I used the Last-Modified method for optimization, the Last-Modified will be updated every time RSS returns.

The following are the results of several requests intercepted using Fiddler:

In the first request, the client does not add the If-Modified-Since header.

The server returns the Last-Modified and the response code is 200, so that the client can use it in the next request.

 

In the second request, the client adds the If-Modified-Since Header based on the Last-Modified returned by the previous request.

The server returned results were not expected to be 304, but still 200. That is to say, all the content was downloaded again. The If-Modified-Since Request Header did not work. Why? Check whether the Last-Modified returned by the server knows that the RSS content is not updated and the length is still 67672. The Last-Modified should be equal to the first Last-Modified.

 

Perform another test:

The result is the same as above. The Last-Modified has changed.

 

The support for Last-Modified will save us a lot of bandwidth. Similar to Last-Modified, it is the Etag header. To learn more about Last-Modified and Etag, refer to: How to Use client cache to optimize the website?

Technorati tags: RSS, Last-Modified, Etag, Request, Fiddler

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.