Skip Navigation

I just lost a REEEEAAAALLY long message . . .

Travel Forums System Talk I just lost a REEEEAAAALLY long message . . .

Page

Last Post

21. Posted by Hien (Moderator 3906 posts) 12y

Hey, it was okay in the preview... Anyway, I'm posting it again without the open and close tag mark.

!--- routine to clear session when browser closes ---
cfif IsDefined("Cookie.CFID") AND IsDefined("Cookie.CFTOKEN")
cfset Variables.cfid_local = Cookie.CFID
cfset Variables.cftoken_local = Cookie.CFTOKEN
cfcookie name="CFID" value="#Variables.cfid_local#"
cfcookie name="CFTOKEN" value="#Variables.cftoken_local#"
/cfif

--
;) Hien

22. Posted by Peter (Admin 5809 posts) 12y

Hi Hien,

Yes, I realized that the no-cache thing is the only way to fix the problem - I'll deal with it today. Unfortunately it wasn't as straightforward as going to the one page and turning it off, because it is included in the header file , which is included in ALL pages.

I'm aware of ways to deal with the browser closing in Coldfusion sessions- the way your friend suggests is a variant. To be honest, I never considered it a problem that it would still be alive if I closed and reopened a browser. You have a good point about internet cafe users though - it is always a possibility and I'm keen to guard against it. Anyway, I'll look into those options today as well (essentially two, of which one is the one your friend mentions) and will make it so it dies on browser close.

What really got me worried about your post though, is that somehow you managed to get some 'illegal' characters in there without the validation kicking in!!! I'll have to go over that routine carefully as well!

Cheers,
Peter

p.s. I'm not always against Javascript - I just prefer to live without it for things that can do without it. :)

23. Posted by Hien (Moderator 3906 posts) 12y

Hi Peter,

Hmm... maybe you could create a separate header file (with no-cache turned off) for the few pages.

On the sessions, it's good to know that you were aware of it. :)

You really think that I managed to get the "illegal" characters in? Haha... Don't worry, your validation worked. It did stop me from posting the characters. But I have a way to go around it. Ok, it's not a big deal. I just use the & l t ; and & g t ; to show the tags. After clicking on preview, it was displayed without problem. But once I posted it, it was lost but the carriage return still remains. What actually happened, Pete? Something wrong in there?

Last but not least, nice to hear that you're not against Javascript ;) I'm not a die-hard fan of Javascript, but it really complements some of the server tasks.

Hien
(wow... am I using too many smileys?)

24. Posted by Peter (Admin 5809 posts) 12y

Ok, I've disabled the no-cache option for the forum reply page only at the moment. As it doesn't make any difference in my browser, I'd appreciate it if you guys could let me know if it works solves the problem in your browsers.

I've got a very simple solution for the server session quitting on browser, but am further investigating it a little more before implementing, as it requires a server restart, which will sessions running at the time of course.

Some serious problems in that form input though, but I won't go into the details, seeing as it would compromise the security of the site somewhat.

Cheers, Peter
too many smilies? what

25. Posted by Hien (Moderator 3906 posts) 12y

Hi Peter,

Good news, it worked! I can now go "back" without reloading the page.

Sam, you should try it. No more losing your message due to clumsy fat fingers.

The session fix is still not working yet. Is it because you have not restarted the server?

Cheers,
Hien

Page