• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • Last Modified:

Cookies that persist after session ends even when browser set to delete cookies on close

I've been looking for a solution on my own for quite some time, so I hope this isn't really basic.

I would like to set a client variable to a database to remember a user's state / shopping cart when they return. In firefox there is the option to allow sites to set cookies until firefox closes. I'm generating a ton of cfids and cftokens locally as I develop because I've chosen that setting (many of my clients have this setting too).

I'm using cf 6.1 on windows 2003 iis 6 for development.

I've noticed that, after I quit firefox and then view cookies, the experts-exchange cookies persist - they are the only ones there.

I'd like to know how you do this so that I can do it too.
0
maryleir
Asked:
maryleir
  • 3
  • 3
  • 2
2 Solutions
 
maryleirAuthor Commented:
Thanks for those articles. I am not really asking how to set and read cookies. I am asking how experts exchange sets cookies that persist after I exit (quit) firefox.

My settings in firefox: Allow sites to set cookies until I close firefox.

Specifically: I start firefox, look at my cookies, ee cookies are the only ones there. I surf the internet for a while, look at my cookies and there are a ton of them from all of the sites I've visited. I quit firefox. I restart firefox and the only cookies that are there are from ee - so ee is doing something different than all of the other sites that set cookies? Do you know what it is / what I'm missing?

Thanks again!!
0
 
dgrafxCommented:
<cfcookie name="username" value="hello" expires="never">
expires can be a number also - 2 would mean 2 days.
Hope this helps
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
dgrafxCommented:
maryleir
I'm confused
The reason I posted is because you said that mtz1of4's answer wasn't of help
Then after I post you reward him (her?) with the points ?????
0
 
maryleirAuthor Commented:
Sorry - I gave you 200 just for responding because I appreciate it. I gave mtz1of4 more because it seemed like he / she tried harder. Neither one of you actually read, understood, and responded to my question so I thought I'd just close this, be polite, and be done with it. expires="never"? Gosh - why didn't I think of that?
0
 
Marc ZCommented:
maryleir,

I apologize.  I guess I didn't fully understand your question.   And in actuality it may be two fold, not just as simple as creating a cookie.

In Firefox, under Tools->Options->Privacy->Cookies->Exceptions might experts-exchange.com be set as Allowed and are there any others that are Allowed that don't seem to show up after Clearing Cookies?
And by any chance, would EE be your Home page, thereby insuring your cookie is set as soon as you open Firefox?

If Firefox is not fully clearing your Cookies when you tell it to, there may be a Bug in the code.

"I would like to set a client variable to a database to remember a user's state / shopping cart when they return."  I can't help with this, I don't do web pages.
0
 
maryleirAuthor Commented:
Awesome. Thank you!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now