By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,705 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,705 IT Pros & Developers. It's quick & easy.

how to declare a cookie that will destroy after browser is closed

P: n/a
Hi all,

I want to use a cookie that will destroy after closing the
browser, in my application.
I am able to destroy my cookie after log out,but don't know how to
destroy this when I will close the browser.
Please help me.

Amar

Jan 31 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Amar wrote:
Hi all,

I want to use a cookie that will destroy after closing the
browser, in my application.
I am able to destroy my cookie after log out,but don't know how to
destroy this when I will close the browser.
Please help me.

Amar
Hi Amar,

Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
Regards,
Erwin Moller
Jan 31 '07 #2

P: n/a
Hi Amar,
>
Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

Regards,
Erwin Moller
Isn't this called a session cookie (vs. a regular cookie)?

SV.

/just curious

Jan 31 '07 #3

P: n/a
On Wed, 31 Jan 2007 11:36:03 -0800, <sa********@gmail.comwrote:
>Hi Amar,

Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

Regards,
Erwin Moller

Isn't this called a session cookie (vs. a regular cookie)?

SV.

/just curious
Session cookies are indeed set with a lifetime of 0, but setting a cookie
with that lifetime doesn't necessarily need to be used for session
management.

--
Curtis, http://dyersweb.com
Feb 1 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.