Is there any way to detect if current page came from back button?
I want to load data from cookie only if current page came from back button.
Use pageshow event to detect back or forward buttons:
$(window).bind("pageshow", function(event) { if (event.originalEvent.persisted) { Alert("User clicked on back button!"); } });
For more details you can check pageshow event in here .