Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: If you do away with server-side state, you don't need cookies

by tmoertel (Chaplain)
on Jul 05, 2005 at 17:07 UTC ( #472525=note: print w/replies, xml ) Need Help??


in reply to Re: If you do away with server-side state, you don't need cookies
in thread "omniscient debugging" for Perl

Whether you send the data to the client as a hidden field in a form, or as a cookie it's basically the same thing.
Not really. The complete-state-in-a-form method allows for easy session forking. It also allows users to undo state transitions by backing up into the browser history. Cookies don't support either of these.

Cheers,
Tom

  • Comment on Re^2: If you do away with server-side state, you don't need cookies

Replies are listed 'Best First'.
Re^3: If you do away with server-side state, you don't need cookies
by adrianh (Chancellor) on Jul 06, 2005 at 10:49 UTC
    Not really. The complete-state-in-a-form method allows for easy session forking. It also allows users to undo state transitions by backing up into the browser history. Cookies don't support either of these.

    Session forking isn't that hard with IDs (whether cookie or URL based). Just have the ID index into a tree of state transitions on the server side. It's something I've done on several sites (and I've a vague memory that somebody has implemented a CPAN module that makes doing this fairly simple, but am to lazy to go find it :-)

    Keeping the state server side can be handy, and having a small ID means I can stick it in a URL and have a more RESTful bookmarkable API.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://472525]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-11-29 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?