Header ("Cache-Control: no-cache ")

Source: Internet
Author: User
Good afternoon, everyone. I can see from the book that header (& quot; Cache-Control: no-cache & quot;) can force the browser not to use the Cache, so I want to test the effect. the code is as follows: {code ...} but I didn't see the expected results. every time I refresh the page, 304 is returned. why not 200 ?...

Good afternoon, everyone. I can see from the book that header ("Cache-Control: no-cache") can force the browser not to use the Cache, so I want to test the effect. the code is as follows:


      
      Document    

But I didn't see the expected results. every time I refresh the page, 304 is returned. why not 200?

I cannot guess...

Reply content:

Good afternoon, everyone. I can see from the book that header ("Cache-Control: no-cache") can force the browser not to use the Cache, so I want to test the effect. the code is as follows:


      
      Document    

But I didn't see the expected results. every time I refresh the page, 304 is returned. why not 200?

I cannot guess...

Html is not 200 ..
Jpg is a static file, and php is returned in apache/nginx, and the cache is also processed by the server.

Clear the browser cache.
The first load, returns 200. If the server does not change, 304 is returned.
To forcibly refresh the page, press Ctrl + F5 on Google's browser.
Check whether the cache is enabled on your web server (such as nginx.

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.