Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
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

 Answers
5

According to the docs, the Performance.navigation property returns a PerformanceNavigation object.



Checking the browsers compatibility at the bottom of the page you can see that chrome is not supported.


[#56480] Tuesday, September 12, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mira

Total Points: 460
Total Questions: 108
Total Answers: 99

Location: American Samoa
Member since Fri, Aug 26, 2022
2 Years ago
mira questions
;