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...