If you'd rather silently refresh the session of a user who's still in your
site, without prompting them, this can be done surprisingly easily with
JavaScript:
<script language="JavaScript">
var dummy = new Image();
function keepAlive() {
dummy.src="servlet.KeepAlive?t=" + new Date.valueOf(); // timestamp
parameter to avoid unwanted caching
window.setTimeout("keepAlive()",1200000); // refresh every 20 minutes in
this example
}
</script>
<body onLoad = "keepAlive()">
That's it! What does the servlet do? Absolutely nothing! But the act of
hitting that URL, ostensibly in order to change the source file for the
(nonexistent in HTML) image is enough to keep the session alive.
I dare say it isn't foolproof, but it seems to work :-)
Nick
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists