- if (document.addEventListener) {
- /*event.persisted 判断浏览器是否有缓存, 有为true, 没有为false*/
- window.addEventListener('pageshow', function (event) {
- if (event.persisted || window.performance && window.performance.navigation.type == 2){
- location.reload();
- }
- },false);
- }
复制代码
|
|