Answers for "Prevent safari loading from cache when back button is clicked"

0

Prevent safari loading from cache when back button is clicked

window.onpageshow = function(event) {
    if (event.persisted) {
        window.location.reload() 
    }
};
//If you are using jQuery then do:

$(window).bind("pageshow", function(event) {
    if (event.originalEvent.persisted) {
        window.location.reload() 
    }
});
Posted by: Guest on July-16-2020

Code answers related to "Prevent safari loading from cache when back button is clicked"

Code answers related to "Javascript"

Browse Popular Code Answers by Language