I have a classic html page generated with PHP.
For this page (served from a same URL) we have 2 cases:
How can I set the header to:
Can I replace my present header:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
With this?
header('Cache-Control: public, max-age=60');
header('Vary: *');
Edit : Is it possible (how) to have it Cache-controled private in case "1" and public in case "2"
If login is purely cookie based then you only need a Vary: Cookie header to make it unique to a particular user. The Vary: * should work just as well though.
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.