I am trying to serve a PHP file output with HTTP Headers configured so the content will NOT be served from cache in Chrome.
If I go to Dev tools (in Chrome), and mark the "Disable cache" option, then it works.
But I don't want to depend on that, I hope I can setup HTTP headers in a way I can force Chrome to reload the page everytime.
Here's a screenshot of my current attempt, please note the red marks.
Could you please provide good documentation or which headers I must declare for this ?
Thanks in advance.
So I found this other reply too: Chrome caching like a mad browser , but since I recall being told that Chrome needs special headers for Cache-Control
, I will keep this question.
Web browsers can cache AJAX requests with the same request parameters. In order to work around this problem, use a query string that changes. One example would be to use the date in seconds as a query parameter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.