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

Am I understanding the SESSION scope properly?

Enthusiast ,
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

I'm working on my framework and am at a point where I want to store user information into the SESSION.

In my onSessionStart() I've created the default structure, set it into the SESSION scope, and all is well.  To my understanding, if session management is on, ColdFusion attempts to provide a CFID and CFTOKEN value to the user's computer that is tied to the current session, right?  If that user is accepting cookies, those ID's are stored as cookies on their machine, and each time they make a new request to the server, their browser sends those identifiers so that CF can see what session information is tied to that user (due to the stateless nature of HTTP).

But if the user has cookies disabled, I'd expect that CF would see that user's subsequent requests as being those from a brand new user, because no IDENTIFIER is being provided in the request, so CF would end up firing off another CFID and CFTOKEN to the user each and everytime they made a request, correct?  This is where they suggest that if you need to maintain session, I could pass the URLToken into each request of a page and read those values, since if it exists in each request, it can be used to maintain the user's pseudo SESSION.

One of my questions is, if the user has cookies disabled, and I store information into the SESSION, that won't stop me from being able to reference that SESSION data for the current request, will it?  I just won't see any changes I make to the data in that SESSION stick on the user's next page request, correct?

Views

275

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
no replies

Have something to add?

Join the conversation
Resources
Documentation