We are into serious Cookie business- HFSJ and Cookies
Joined: Sep 16, 2003
We are into serious Cookie business
I have just started reading HFSJ book. The book I indeed good but it fails to explain the Cookie features completely.
I wanna know, that how can we make a Cookie exist on the client machine for ever. The setMaxAge(int secs) method just makes it alive on the client for the specified period. But, how do I go about persisting it on the client machine.
Also, I now that somewhere there�s a folder called �cookies� in my Windows OS. I hope it�s this folder where all my cookies are stored?
You can't. If you could, everyone would try it and your browser would overflow with cookies!
The best you can do is set the max time to a very high number to keep the cookie around for a very long time. If you need to store a value forever, you might want to consider storing it in a DB instead of a cookie.
Hope this helps. Since your question is not a topic covered by the exam, I'm going to close this thread. Please try to keep your questions within the scope of the SCWCD objectives. If your curiosity causes you to wander from the objectives, we have other forums at the ranch for that.