An exception occurred in http200fromcache.

Source: Internet
Author: User
Browsers used: Pc-side chrome and various browsers on the mobile phone access the same url address: xxx.aaa.bbb.comship.html in the Test environment: Some students access this address, the page still displays the data from the last visit to this page, not...

Browsers used: Pc chrome and various browsers on mobile phones
Access the same url address: http://xxx.aaa.bbb.com/ship.html

In the Test environment: Some students access this address. when they access this address again, the page still displays the data from the last visit to this page, which is not the latest data. Check its http. There are several important parameters: 200 and from cache. Some students access this address each time, and the page is the latest data. they can view the important http parameters without the from cache.

From cacheWhat I don't know is why some people access the same server with the from cache, while some users load the latest page data from the server. What does this affect it?

Note:

  • This problem does not exist in the official online environment. access is normal and the latest page data is loaded from the server each time.

  • Ship.html is not a straight static page, but a pseudo static page.

  • The following header has been set:


Reply content:

Browsers used: Pc chrome and various browsers on mobile phones
Access the same url address: http://xxx.aaa.bbb.com/ship.html

In the Test environment: Some students access this address. when they access this address again, the page still displays the data from the last visit to this page, which is not the latest data. Check its http. There are several important parameters: 200 and from cache. Some students access this address each time, and the page is the latest data. they can view the important http parameters without the from cache.

From cacheWhat I don't know is why some people access the same server with the from cache, while some users load the latest page data from the server. What does this affect it?

Note:

  • This problem does not exist in the official online environment. access is normal and the latest page data is loaded from the server each time.

  • Ship.html is not a straight static page, but a pseudo static page.

  • The following header has been set:


If the server does not clearly define cache control, different clients may have different cache mechanisms.
If you want the user to obtain the latest data each time, you can set the meta tag as follows:


  
  
  
  
  

Setting meta tag is only valid for html pages. a better way is to set cache control in the http response header:

Cache-Control: no-cache, no-store, must-revalidatePragma: no-cacheExpires: 0

Php code for setting the http response header:

header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.header("Pragma: no-cache"); // HTTP 1.0.header("Expires: 0"); // Proxies.

Using cache helps speed up page loading and reduce resource consumption. you should adjust the cache policy as needed.

Reference

Http://stackoverflow.com/ques...
Http://stackoverflow.com/ques...

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.