[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Penner, Matthew
AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Session management in an Ajax app Michael Geary wrote on 10/9/2007 1:27 PM: > It's still an interesting bit of code (of course I would say that!) - > the $.expire function shows how easy it is to augment an existing > JavaScrip

[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Bil Corry
Michael Geary wrote on 10/9/2007 1:27 PM: It's still an interesting bit of code (of course I would say that!) - the $.expire function shows how easy it is to augment an existing JavaScript function with new behavior. It *is* interesting, thanks for sharing the code. We display a countdown ti

[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Michael Geary
I noticed one error in the $.expire function I posted in the previous message. It doesn't pass through the return value from the original function. This line: > fn.apply( this, arguments ); should be: > return fn.apply( this, arguments ); Worse, this solution doesn't ta

[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Dan G. Switzer, II
Rey, >A buddy of mine, Raymond Camden, posted an interesting question on his >blog: > >"How can you timeout a session in an Ajax-based application?" > >http://www.coldfusionjedi.com/index.cfm/2007/10/8/Ask-a-Jedi-How-can-you- >timeout-a-session-in-an-Ajaxbased-application > >The gist is that if y

[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Penner, Matthew
There are actually two things to think of here. I don't know about CF specifically but it seems that most web servers should update their session timeout if data has been accessed in any way. I would assume that any AJAX request to the server by the browser would update this status. If y

[jQuery] Re: Session management in an Ajax app

2007-10-08 Thread Michael Geary
Rey and I were kicking this around in IM and I came up with a little plugin to do this. The idea is that you want to alert the user a short while before the server session times out. If you know how long the session timeout is, you can use code like this: (function( $ ) { $.expire = function

[jQuery] Re: Session management in an Ajax app

2007-10-08 Thread Rabbit
Rey Bango wrote: > The gist is that if you have a dashboard-type app and you need to > determine if your session has timed out on the next Ajax request, how > would you go about doing it. He mentioned creating a ping-like service > that would poll the server every so often. It seems that this woul