2015-01-21 82 views

回答

0

尝试使用

location.reload(true); 

应该Safari的工作) MDN link

+0

谢谢,但还是一样 – olo 2015-01-21 03:59:51

+0

同样在这里的问题:/ – 2016-01-07 14:46:00

0

这个技巧为我工作:/

https://gist.github.com/voku/854fef3b9a3fbf10624f

/** 
 
* reload on history-back with "history.pushState" usage 
 
* 
 
* Necessary hack because WebKit fires a popstate event on document load 
 
* https://code.google.com/p/chromium/issues/detail?id=63040 
 
* https://bugs.webkit.org/process_bug.cgi 
 
*/ 
 
$(window).bind('load', function() { 
 
    if (Modernizr.history) { 
 
    setTimeout(function() { 
 
     $(window).bind('popstate', function() { 
 
     location.reload(); 
 
     }); 
 
    }, 0); 
 
    } 
 
});