I’m using AJAX.NET including update panels, web service calls, client controls etc.
In may page I include 3rd party javascript file that makes keep-alive call for limited preconfigured amount of time (say 30 min). this script is my session keeper.
every time the user have an interaction with the browser – i want to run a method in this script to reset the counter for new 30 min.
Is there a place that is prior / later to all my ajax calls where i can put this method call instead doing that everywhere dozens of times?
Thanks.
I’m not sure if there is a way to catch every ajax call, but the handler below will fire after every asynchronous postback(eg updatepanel)
More info here: http://msdn.microsoft.com/en-us/library/bb383810.aspx
As Chaotic_one mentioned, jQuery does have the concept of global events that fire before/after every ajax call, but I think that only refers to calls made using jQuery.