148
rated 0 times
[
150]
[
2]
/ answers: 1 / hits: 19682
/ 7 Years ago, thu, september 14, 2017, 12:00:00
I have been trying to implement a functionality when the page refreshes. I figured that value of
window.performance.navigation.type
turns 1 if the page reloads else, it is 0. I created an alert message on page load and the values are correct for IE and Firefox but it remains 0 for Chrome throughout no matter how many times the page reloads. I have also tried windows.onbeforeunload as per other stackoverflow answers but nothing seems to work!
How do I resolve this?
OR
Is there another way to detect a page reload that works on all the browsers?
Thanks!
More From » jquery