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



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
.



Relevant Pages

  • Re: "enter network password" does not appear
    ... >> Stop saving the cookie for that domain. ... You might also try remembering to logout before closing the browser. ... Closing the browser won't necessarily end the session and log you out. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Losing session data on browser close
    ... When a user logs onto my site, I set some session data using php: ... valid until either I destroy the cookie or the user clears their ... as long as they keep their browser open. ...
    (comp.infosystems.www.authoring.html)
  • Re: Cookie is in a cache?
    ... However when closing the browser or leaving the site and than returning ... will result with empty $_COOKIE. ...
    (comp.lang.php)
  • how to declare a cookie that will destroy after browser is closed
    ... I want to use a cookie that will destroy after closing the ... I am able to destroy my cookie after log out,but don't know how to ... destroy this when I will close the browser. ...
    (comp.lang.php)
  • Re: Servlet API deletes cookie instead of over-writing it
    ... am getting the cookie, unless for the third request user is closing the ... will be deleted after the browser is closed. ...
    (comp.lang.java.programmer)