瀏覽器使用者返回上一步,自動重新整理 方式一、 <input type="hidden" id="refreshed" value="no"> <script type="text/javascript"> onload=function(){ var e=document.getElementById("refreshed"); if(e.value=="no")e.value="yes"; else{e.value="no";location.reload();} } </script > 方式二、 header("Cache-Control: no-store, must-revalidate, max-age=0"); header("Pragma: no-cache"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 方式三、 window.onpageshow = function(event) { if (event.0) { window.location.reload() } };
轉載註明出處:https://www.cnblogs.com/cblogs/p/6126387.html