Browser remembers form state after a refresh. How to avoid?
Often times a browser will remember the form-state when the refresh button is hit. This is troublesome, because I actually want the updated database state to be shown when a user hits refr开发者_运维百科esh.
Is there a way I can trick the browser to not remember the current form state?
<?
//Set no caching
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
Brute force!
精彩评论