2017-06-21 156 views

回答

2

可以使用window.location.reload函数加载页面。如果您需要在完成页面后重新加载,请使用window.onload事件。 (reload函数有一个参数,它可以禁用缓存。)

window.onload = function(){ window.location.reload()} //reload with using browser cache 
window.onload = function(){ window.location.reload(true)} //reload without using browser cache 

另一种方式是发送refresh头到浏览器通过设定刷新头在PHP中:

<?php 
header("refresh:5"); //loaded page reload after 5 seconds 
?>