The post was reposted from: http://vspug.com/kwanl/2006/08/31/formdigest-extender/
Recently, I have been working on a SharePoint-based web app that uses some Ajax to reduce the number of postbacks. Because it might be a long time before the user triggers another postback the page’s security validation can potentially timeout; giving the user a frightening error page.
While this works fairly well there is room for improvement.
First, it makes a request to the current page which can cause problems or at the very least it’s a waste of bandwidth. A possible fix for this would be to create a very small stub page to call instead for updating the security validation.
Second, you must remember the purpose of the security validation. It’s for security! You shouldn’t be infinitely extending the security validation of the page without good reason. So it is best to only extend it based on some user action.
The example is contained in teh attached dwp (remove the .txt from the filename).
Warning: Use the FormDigest Extender at your own risk.