Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
180
rated 0 times [  182] [ 2]  / answers: 1 / hits: 57735  / 14 Years ago, wed, july 14, 2010, 12:00:00

I am curious if there is a way to detect the browser refresh event in javascript specifically. We are using the jQuery.address plugin to provide forward and back button functionality to AJAX functions. The problem I am facing is that this plugin does not seem to detect if the user has refreshed the page.



This code is executed each time the user moves forward or back in the browser history. I would also like it to exexute when the user refreshes.



 $.address.init(function(event) {
}).change(function(event) {

SummaryDiv.SwapPanels(newPanelID);
}


Any ideas?


More From » jquery

 Answers
35

A naive attempt of mine would be to simply store the current state into some cookie after each change and simply load them again on each page load.


[#96231] Monday, July 12, 2010, 14 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
;