BigMax
It seems doesn’t work like that in Chrome, that caches the first answer (private), and doesn’t care if becomes stale (max-age=0).
I reckon this doesn’t sound exactly right, but that’s how the most used browser in the world behaves.
Why don’t you just use “no-cache”? This literally means “cache nothing”.
Just to be sure, PHP automatically sets:
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: a date in the past
This results in a quite solid technique to prevent caching, which could make it through various bugs and legacy interpretations of the browsers through the years.
I reckon this doesn’t sound exactly right, but that’s how the most used browser in the world behaves.
Why don’t you just use “no-cache”? This literally means “cache nothing”.
Just to be sure, PHP automatically sets:
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: a date in the past
This results in a quite solid technique to prevent caching, which could make it through various bugs and legacy interpretations of the browsers through the years.