Re: Clearing session
| From: | Larry Martell | Date: | Wed, 26 Feb 2014 19:51:10 +0000 |
| Subject: | Re: Clearing session | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322999@lists.php.net to get a copy of this message | ||
On Wed, Feb 26, 2014 at 2:49 PM, Ashley Sheridan
<ash@ashleysheridan.co.uk> wrote:
> On Wed, 2014-02-26 at 14:47 -0500, Larry Martell wrote:
>> On Wed, Feb 26, 2014 at 2:39 PM, Ashley Sheridan
>> <ash@ashleysheridan.co.uk> wrote:
>> > On Wed, 2014-02-26 at 14:33 -0500, Larry Martell wrote:
>> >> Is there a way I can clear my session data from the browser? This is
>> >> for debugging when I change something. Currently no matter what I do
>> >> short of exiting the browser, my session data is always retained. This
>> >> makes testing very cumbersome.
>> >>
>> >
>> > The session data is actually stored on the server, the browser just
>> > sends a session id in the requests it makes to the server so that the
>> > server can access the right data.
>> >
>> > You could clear the cookie (or URL parameter if you're using that
>> > method), that contains the session ID, from your browser, or you could
>> > follow the advice at
>> >
>> > http://uk3.php.net/manual/en/function.session-destroy.php which
>> > explains
>> > in a decent detail exactly how to do what you want.
>>
>> Thanks for the reply, but I am aware of all that and I know about
>> session_destroy. I want to clear the session from the browser not from
>> the code.
>
> Did you even look at the link I posted? The second paragraph quite
> clearly mentions:
>
> "If a cookie is used to propagate the session id (default behavior),
> then the session cookie must be deleted. setcookie() may be used for
> that."
I had read that page before, but I missed the part about the session cookie.