2016-06-28 43 views

回答

0

感谢您的回复。我的主要目的是在单击退格按钮后禁用从缓存中调用页面。我用下面的脚本解决了它:

<script> 
if (window.history && window.history.pushState) { 
      window.history.pushState(null, null, window.location.pathname + window.location.search); 
      $(window).on('popstate', function() { 

       window.location = document.referrer; 
      }); 
     } 
</script>