durusmail: quixote-users: cookies
cookies
2002-05-28
2002-05-28
2002-05-28
2002-05-28
2002-05-29
2002-05-29
2002-05-29
2002-05-29
2002-05-29
cookies
Patrick K. O'Brien
2002-05-29
[Greg Ward]
> On 29 May 2002, Patrick K. O'Brien said:
> > Now that I've got my style switcher working, could you give a
> brief summary
> > of the reasons why the session management mechanism would be
> better that a
> > specific cookie for this? Thanks.
>
> 1) Less code -- you only have to check that the user's selection
>    is sane once.
>
> 2) Cleaner code -- you can abstract checking the user's selection
>    to your Session class, eg. in a set_style_sheet() method.
>
> 3) Fewer cookies to send -- speaking for myself, I hate sites that
>    send a separate cookie for every little piece of information.
>    I'm peevish and tend to start rejecting cookies after receiving
>    2 or 3 from the same server, assuming I accept any in the
>    first place.
>
> 4) More room to grow -- what other per-user state information are
>    you going to want to keep in future?  With session management,
>    it's just a question of adding attributes to your Session class.

Excellent. I'm sold! Thanks.

---
Patrick K. O'Brien
Orbtech


reply