• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Closing Session when Browser Closes

LEGEND ,
Jun 22, 2006 Jun 22, 2006

Copy link to clipboard

Copied

Can anyone help me with closing out the session when the browser closes?

I first started my project using a Application.cfm file. Then after further
research found the newer method of using the Application.cfc file with
cfcomponent tags instead.

Using the newer Application.cfc method seems to not allow the following
statements that would destroy the CFID and CFTOKEN cookies when the browser
closes and generates a "Element CFID is undefined in SESSION" error message:

<!---Preserve Session/Client variables only until browser closes--->
<cfset Cookie.cfid = SESSION.cfid>
<cfset Cookie.cftoken = SESSION.cftoken>

What is the proper command/method of doing the same when using a
Application.cfc file?

I would also like to know how to test if the CFID and CFTOKEN cookies are
actually being passed to the browser and to see them physically disappear
after the browser closes.

Thanks,
Herb


TOPICS
Advanced techniques

Views

278

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2006 Jun 22, 2006

Copy link to clipboard

Copied

Forgot to mention,

I have tested on my develoment server with the "Use J2EE session variables"
turned on and that fixes the problem.

My Web Hosting Company does not have J2EE session variables turned on
because they say it causes too many problems and they will not turn it on
for me.

Herb


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2006 Jun 25, 2006

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 30, 2006 Oct 30, 2006

Copy link to clipboard

Copied

LATEST
CFID and CFTOKEN do not get deleted on a browser close, only J2EE sessions do and frankly I am having issues with getting those to be removed on a browser close in CF7.02 so I dont know if thats a true statement yet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation