Answers for "can i force refresh a page from javascript"

84

refresh window js

window.location.reload();
Posted by: Guest on April-05-2020
0

refresh page and run function after javascript

window.onload = function() {
    var reloading = sessionStorage.getItem("reloading");
    if (reloading) {
        sessionStorage.removeItem("reloading");
        myFunction();
    }
}

function reloadP() {
    sessionStorage.setItem("reloading", "true");
    document.location.reload();
}
Posted by: Guest on November-03-2020

Code answers related to "can i force refresh a page from javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language