2016-06-28 41 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>