How long does a session cookie last?

Y

yingjian.ma1955

Hi All,

According to a book, the cookie without expires lasts the browser
session. I think a browser session ends if you close all the browser
windows. I setup a cookie without expires in IE6 using JavaScript and
closed it. When I open IE agian, the cookie is still there. Why?
Does it mean that a session cookie will be deleted at some time after
the browser session? (Just like a stored cookie will be deleted at
some time after the Expires attribute)

Does the browser delete the cookie or the OS delete the cookie?

Thank you.
 
C

cwdjrxyz

I happen to be using the Firefox browser at the moment. On it, I can
view all cookies. When you highlight one of the cookies listed, a
screen shows when the cookie expires, among other things. So the first
thing you need to do is find out when the cookie expires. This might
help answer your question. At least on the Windows XP OS, if something
changes a registry setting, it often does not take effect until Windows
is shut down and then rebooted. So also turn off your computer, not
just the browser, and see what happens. I believe you can also find
cookies listed on IE6 and perhaps find the date a cookie expires, but I
never use it for this. I find Firefox much more simple to navigate for
this sort of thing.
 
Y

yingjian.ma1955

I couldn't find the cookie as a file because it was not saved. I knew
it was there when I restarted the browser since the page remembered it.
 
T

Thomas 'PointedEars' Lahn

I couldn't find the cookie as a file because it was not saved.

Wait a minute. Did you not write before that the cookie was still there?
So there has to be a file for it in Temporary Internet Files folder (if
you used IE or an IE-based browser on Windows).
I knew it was there when I restarted the browser since the page
remembered it.

Which page are we talking about (URL)?


PointedEars

P.S.: Please read <http://jibbering.com/faq/> on how to post to cljs,
especially on how to quote.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top