Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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() 
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Prevent #safari #loading #cache #button #clicked
ADD COMMENT
Topic
Name
7+2 =