RE: keeping a session alive

2009-08-16 Thread Justin Scott
I have an application that, after 20 mins of idle (detected by JS), the user is given a warning saying they are about to be logged out with a link to keep the session going. My original plan was to sent an AJAX request to a page when the link is clicked, but I have read that an AJAX

Re: keeping a session alive

2009-08-14 Thread Alan Rother
Just off the top of my head and without doing any research into the topic. Assuming everything you said is accurate, that you can't sustain the session with an AJAX request, when your user clicks the link, it could load a 1px x1px iframe into a div on the page that loads a keep alive page, thus

RE: keeping a session alive

2009-08-14 Thread brad
I have read that an AJAX request will not keep the session alive. Where did you hear that? If the Ajax request is to a ColdFusion page that is part of your application it will most certainly keep the session alive. The server, after all, doesn't even know it is an Ajax call. ~Brad

Re: keeping a session alive

2009-08-14 Thread Tony Bentley
Server: If you have a session going and it is idle up to the timeout it will end. As soon as another request happens after the timeout, a new session begins. If a request occurs before the timeout, the countdown begins all over again. Client/browser side: Seems like you need to write

RE: keeping a session alive

2009-08-14 Thread Andy Matthews
: Friday, August 14, 2009 3:59 PM To: cf-talk Subject: RE: keeping a session alive I have read that an AJAX request will not keep the session alive. Where did you hear that? If the Ajax request is to a ColdFusion page that is part of your application it will most certainly keep the session alive

RE: keeping a session alive

2009-08-14 Thread brad
that it adds this to the header automatically. -Original Message- From: b...@bradwood.com [mailto:b...@bradwood.com] Sent: Friday, August 14, 2009 3:59 PM To: cf-talk Subject: RE: keeping a session alive I have read that an AJAX request will not keep the session alive

Re: keeping a session alive

2009-08-14 Thread James Holmes
2009/8/15 Eric Hynds e...@hynds.net:  I was wondering ... if what I read was wrong and you actually can keep the session alive with an AJAX request. This is the case. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog

RE: Keeping a session alive

2005-12-02 Thread Dan G. Switzer, II
Bobby, 1) I absolutely REFUSE to use a frame or Iframe whatsoever. Then you like making life hard. ;) While an frame would be the most compatible, and IFRAME should really work in every modern browser (doesn't work in Netscape 4, but if you need that you could use an ILAYER tag for NS4.)

RE: Keeping a session alive

2005-12-02 Thread Katz, Dov B \(IT\)
setInterval(document.images['session'].src='image.cfm';,600); This will keep the session alive... -Original Message- From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 11:03 AM To: CF-Talk Subject: RE: Keeping a session alive Bobby, 1) I absolutely REFUSE

RE: Keeping a session alive

2005-12-02 Thread Bobby Hartsfield
Hey, that’s pretty nifty there thanks. ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 11:08 AM To: CF-Talk Subject: RE: Keeping a session alive If you want

RE: Keeping a session alive

2005-12-02 Thread Bobby Hartsfield
AM To: CF-Talk Subject: RE: Keeping a session alive Bobby, 1) I absolutely REFUSE to use a frame or Iframe whatsoever. Then you like making life hard. ;) While an frame would be the most compatible, and IFRAME should really work in every modern browser (doesn't work in Netscape 4, but if you

Re: Keeping a session alive

2005-12-02 Thread Claude Schneegans
1) I absolutely REFUSE to use a frame or Iframe whatsoever. You're right. Have a look at XMLHttpRequest in Javascript. You can call a CF template every 10 min or so, directly from a script, without having to reload any part of the page, no blink, no glass cursor, no nothing. The user will see

RE: Keeping a session alive

2005-12-02 Thread Russ
This is probably what I meant when I said use AJAX. -Original Message- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 11:25 AM To: CF-Talk Subject: Re: Keeping a session alive 1) I absolutely REFUSE to use a frame or Iframe whatsoever. You're right

RE: Keeping a session alive

2005-12-02 Thread Jim Davis
-Original Message- From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 11:08 AM To: CF-Talk Subject: RE: Keeping a session alive If you want to refresh, you can also use an image I've an extensive article and sample code for using a GIF as a data

RE: Keeping a session alive

2005-12-02 Thread Bobby Hartsfield
a session alive -Original Message- From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 11:08 AM To: CF-Talk Subject: RE: Keeping a session alive If you want to refresh, you can also use an image I've an extensive article and sample code for using a GIF

Re: Keeping a session alive

2005-12-02 Thread Claude Schneegans
This is probably what I meant when I said use AJAX. Probabily, although AJAX may be a big word when only a couple of lines of code are needed in this case. ~| Logware (www.logware.us): a new and convenient web-based time

RE: Keeping a session alive

2005-12-02 Thread Dan G. Switzer, II
Bobby, Just out of curiosity... can a frame trigger a js event in another frame? Provider there are the same domain (which is usually the case,) yes. Just use the parent object to reference the document object that created the iframe /. Just curious since I still refuse to use one :) That's

Re: Keeping a session alive

2005-12-01 Thread Ryan Guill
Ive got a js routine that does just this. Basically you set it to a minute less than your session timeout. If it expires, it reloads the page they are on. Just dont want to use it with any pages that you post to. Let me know if you want it. On 12/1/05, Bobby Hartsfield [EMAIL PROTECTED]

RE: Keeping a session alive

2005-12-01 Thread Mike Klostermeyer
so if they are in the middle of typing War and Peace in a form field when the JS kicks off, they lose it all? Mike -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 1:22 PM To: CF-Talk Subject: Re: Keeping a session alive Ive got a js

Re: Keeping a session alive

2005-12-01 Thread Ryan Guill
, 2005 1:22 PM To: CF-Talk Subject: Re: Keeping a session alive Ive got a js routine that does just this. Basically you set it to a minute less than your session timeout. If it expires, it reloads the page they are on. Just dont want to use it with any pages that you post to. Let me know

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
, December 01, 2005 2:25 PM To: CF-Talk Subject: RE: Keeping a session alive so if they are in the middle of typing War and Peace in a form field when the JS kicks off, they lose it all? Mike -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 1:22 PM

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 2:22 PM To: CF-Talk Subject: Re: Keeping a session alive Ive got a js routine that does just this. Basically you set it to a minute less than your session timeout. If it expires, it reloads the page they are on. Just

Re: Keeping a session alive

2005-12-01 Thread Ryan Guill
something like this too much to have it handed to me :) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 2:22 PM To: CF-Talk Subject: Re: Keeping a session alive Ive

RE: Keeping a session alive

2005-12-01 Thread Russ
: Thursday, December 01, 2005 2:58 PM To: CF-Talk Subject: RE: Keeping a session alive Very much appreciated. I really was just curious of what others thought about the idea... pros/cons... that sort of thing. I'd enjoy writing something like this too much to have it handed to me

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
://acoderslife.com -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 3:10 PM To: CF-Talk Subject: RE: Keeping a session alive Why not use a frame or an iframe to load a page on the server in the background? This way they won't have to lose the current

RE: Keeping a session alive

2005-12-01 Thread Russ
to the site, and that is all that's required to keep the session active. -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 3:16 PM To: CF-Talk Subject: RE: Keeping a session alive Like I said in the original post, both are options

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
-Talk Subject: RE: Keeping a session alive Well if you use an iframe, you can set it to a page that reloads every few seconds (minutes). No javascript needed, just META REFRESH. Same with Frame. But Frame would require you to build your site using frames (yuck). I would really love an AJAX

RE: Keeping a session alive

2005-12-01 Thread Dawson, Michael
PROTECTED] Sent: Thursday, December 01, 2005 1:56 PM To: CF-Talk Subject: RE: Keeping a session alive Only if the session dies before they submit it. In that case, they are sent to the login form and the forms post is lost. ~| Logware

Re: Keeping a session alive

2005-12-01 Thread Ryan Guill
, but it sounds like it should work, huh? M!ke -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 1:56 PM To: CF-Talk Subject: RE: Keeping a session alive Only if the session dies before they submit it. In that case

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 1:56 PM To: CF-Talk Subject: RE: Keeping a session alive Only if the session dies before they submit it. In that case, they are sent to the login form and the forms post is lost

RE: Keeping a session alive

2005-12-01 Thread Russ
[mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 4:33 PM To: CF-Talk Subject: RE: Keeping a session alive Yeah, it sounds like it would work (for the most part) but it would probably have to be stored in a session of its own and used to populate the form again since the form scope would

RE: Keeping a session alive

2005-12-01 Thread Ben Nadel
Maybe I missed something earlier in the thread, but why not just make the session time out longer, like a Day, or 4 hours. Why go though all this trouble when a long session timeout would accomplish the same thing?? ... Ben Nadel Web Developer Nylon Technology 6 West 14th

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
- From: Russ [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 4:49 PM To: CF-Talk Subject: RE: Keeping a session alive Why are you thinking so complicated? A simple 1x1 pixel iframe that goes to a refresh.cfm page should do the trick. And the page can be refreshed using javascript

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
Hartsfield http://acoderslife.com -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 4:56 PM To: CF-Talk Subject: RE: Keeping a session alive Maybe I missed something earlier in the thread, but why not just make the session time out longer, like

Re: Keeping a session alive

2005-12-01 Thread Ryan Guill
Nadel [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 4:56 PM To: CF-Talk Subject: RE: Keeping a session alive Maybe I missed something earlier in the thread, but why not just make the session time out longer, like a Day, or 4 hours. Why go though all this trouble when a long

RE: Keeping a session alive

2005-12-01 Thread Dawson, Michael
Pass a WDDX packet, use hidden form fields and then a javascript form submit. There are probably a few other ways. -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 3:22 PM To: CF-Talk Subject: Re: Keeping a session alive How would you

RE: Keeping a session alive

2005-12-01 Thread Dawson, Michael
: Keeping a session alive Why are you thinking so complicated? A simple 1x1 pixel iframe that goes to a refresh.cfm page should do the trick. And the page can be refreshed using javascript or meta refresh without affecting the main page that the user is working

RE: Keeping a session alive

2005-12-01 Thread Dave Watts
Why not set the session timeout to be a very large value? It seems almost pointless to have the keep-alive ping yet still want to keep the site authenticated? One reason you might do this is to keep a session alive as long as the browser is actually open and pointing to that site, but kill

RE: Keeping a session alive

2005-12-01 Thread Bobby Hartsfield
Not just one reason but THE reason :) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 6:40 PM To: CF-Talk Subject: RE: Keeping a session alive Why not set