开发者

Browser remembers form state after a refresh. How to avoid?

开发者 https://www.devze.com 2023-02-14 13:07 出处:网络
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开发者_运维百

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消