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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amar

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

    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

  • Erwin Moller

    #2
    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

    Comment

    • salvadorvp@gmail.com

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

      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

      Comment

      • Curtis

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

        On Wed, 31 Jan 2007 11:36:03 -0800, <salvadorvp@gma il.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

        Comment

        Working...