Find out whether the page was cached by the browser:
<!DOCTYPE html> <html> <body onpageshow="myFunction(event)"> <p id="demo"></p> <script> function myFunction(event) {/*from w ww . j a va 2 s. c o m*/ if (event.persisted) { document.getElementById("demo").innerHTML = "The page was cached by the browser"; } else { document.getElementById("demo").innerHTML = "The page was NOT cached by the browser"; } } </script> </body> </html>