can you end with JS a cookie session you started with PHP

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

can you end with JS a cookie session you started with PHP

Post by PHPHelpNeeded »

Can one end with javascript a session you started with PHP?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: can you end with JS a cookie session you started with PH

Post by Celauran »

Sessions? No. Sessions are server side, JS runs client side. Cookies are accessible to JS, though.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: can you end with JS a cookie session you started with PH

Post by Weirdan »

So resetting the session cookie on the client side will effectively close the session for that client. Session data on the server associated with that cookie will not be used anymore and will get garbage-collected eventually.
Post Reply