logo
Search
showing results for - "js how to determine if page was cached"
Patti
15 Nov 2019
1// https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent
2window.addEventListener('pageshow', myFunction);
3
4function myFunction(event) { 
5  if (event.persisted) {
6    alert("The page was cached by the browser");
7  } else {
8    alert("The page was NOT cached by the browser");
9  }
10}
similar questions
nodejs cache dataangular http call caching issue even after no cachejavascript detect pagejavascript empty cache and hard reloadjavascript to detect browserjavascript detect browserclear cache after ajax successclear cache javascriptjs detect browserafficher un div qui etait cache en javascriptforece reload without clear cache jsexternal javascript files can be cached
queries leading to this page
js check if browser has cachecheck if there is new cache in javascriptjs on document load does not execute on cachecheck if page is cached jacascriptcheck if site has new cached javascriptjavascript check if browser has cachesjs how to determine if page was cachedhw to chek if site is cached javascriptjs how to determine if page was cached
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue