[mapguide-users] How to check if session is expired?
Chris Claydon
chris.claydon at autodesk.com
Wed Nov 26 13:01:19 EST 2008
Fusion already accesses the MG server periodically to keep the session alive. From my server log, it looks like it does it every 5 minutes by default.
Chris.
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of gingerbbm
Sent: Wednesday, November 26, 2008 9:46 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] How to check if session is expired?
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.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list