[mapguide-users] How to check if session is expired?

gingerbbm stuart.jones at jacobs.com
Wed Nov 26 11:45:43 EST 2008


FYI I have implemented the following "keep alive" functionality in Fusion.

This JavaScript excerpt uses the PeriodicalExecuter() class from Prototype.
Place it in your "Fusion initialised" function. It will do a getScale()
every 20 minutes and it appears to keep the map live all day :)

	//
	// Periodically poll the MapGuide server to keep the session alive.
	//
	var map = Fusion.getMapById('Map');
	new PeriodicalExecuter(
		function(pe) {
			console.log('Employing keep-alive measures [' + new Date() + ']');
			map.getScale();
		},
		1200 // period, in seconds
	);

Hope this helps somebody...

Cheers
Stuart
-- 
View this message in context: http://www.nabble.com/How-to-check-if-session-is-expired--tp6146014p20704615.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list