兰兰想的博客

脑海中的创意, 生活中的点滴
返回列表

Prevent safari loading the last page as the same when leave when navigating back

Sat Nov 21 2020 19:21:38 GMT+0800 (China Standard Time)


when press back button, safari will navigate to the page that is same as when we leave, we don't want that, use this code!

window.onpageshow = function(event) {
    if (event.persisted) {
        window.location.reload() 
    }
};

from : https://stackoverflow.com/questions/8788802/prevent-safari-loading-from-cache-when-back-button-is-clicked

返回列表

相关文章

vc++ 2022 minimum or additional runtime missing the feature you are trying to use is in a network resource that is unavailable

阅读 12/4/2022, 2:12:00 PM

关于同构JavaScript的一些内容(同构JavaScript应用开发读书笔记)

阅读 4/26/2022, 8:05:58 PM

前端注意的事情rail

阅读 4/9/2022, 6:19:30 PM

在自己做前端时需要做的四个核心内容

阅读 4/9/2022, 6:12:28 PM

前端中需要注意DNS带来的延迟

阅读 4/9/2022, 6:00:04 PM

IDEA SECTOR