Re: Re: Cookies - good or bad???
| From: | Justin French | Date: | Thu, 18 Jul 2002 17:00:25 +0000 |
| Subject: | Re: Re: Cookies - good or bad??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108302@lists.php.net to get a copy of this message | ||
on 19/07/02 1:19 AM, Cord Schneider (oo6jmt8en001@sneakemail.com) wrote:
> A number of people have offered their opinion why cookies are a bad idea. As
> a developer new to PHP, if cookies are such a big a big no-no, how does one
> do effective session management without storing anything client-side?? Bear
> in mind that the browser is stateless and, the user can disconnect and
> reconnect in between fetching pages from your site.
You pass the session around in the URL
Something like <A HREF="page.php?SID">click here</a>, or you might build a
wrapper function that does it for you:
<A HREF="<?=link('page.php')?>">click here</a>.
Yes, that's every internal (relative) URL on your whole site :)
It becomes a trade-off between the convent but unreliable cookies, versus
the 100% accessible, but perhaps time consuming/tricky URL method.
As has been said on this list MANY times, just have a look at the big sites
like amazon.com -- no cookies, no javascript, no reliance on client-side for
anything. Take care of it all server-side, where you have a controlled
environment.
Justin French