SessionSyncJS is a project mainly written in JavaScript, it's free.
A Javascript Library for managing server sessions
SessionSyncJS is a Javascript library for managing your server-side session within client-centric javascript applications.
Some of the common issues this library solves are:
sessionSync.start({
refreshSessionRequest: function(responseCallback){
//use jQuery AJAX or your favorite AJAX call to
//hit the server and keep the session alive
responseCallback(true); //tell the callback true or false if it worked!
}
});