When we output the $_SERVER
variable like this:
die('<pre>' . print_r($_SERVER, true) . '</pre>');
We'll get alot of taha, and between them these items:
[HTTP_CONNECTION] => keep-alive
[HTTP_CACHE_CONTROL] => max-age=0
When we to page reload (Refresh button, CTRL+R or F5)
, they will remain there, and values will not be changed.
But when I press CTRL + F5
(clear cache), a new item will appear under those two items:
[HTTP_PRAGMA] => no-cache
So my question is what shall browser do if I set:
$_SERVER['HTTP_PRAGMA'] = 'no-cache';
On top of my PHP scripts for every request? Will the browser always understand this as—clear cache for this web page?