Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How do you do sessions in Web Sites

by pajout (Curate)
on Oct 17, 2005 at 12:00 UTC ( [id://500703]=note: print w/replies, xml ) Need Help??


in reply to How do you do sessions in Web Sites

I use following model:
1/ When new session created (for every user, including anonymous), session identificator is generated as random string, beginning with letter, for instance g4Kj90hUl.
2/ Depending on application requirement, that sess_id is included as hidden field in every application page, or/and the cookie with sess_id is sent. The advantage of hidden field is the possibility of two opened browser windows with different login, the advantage of cookie is the possibility of walking out of application url and back without lose of authentication. I think that GET or POST is another story.
3/ The aditional session informations, including expire rules, are stored in SQL (or Berkeley :) database under sess_id.
  • Comment on Re: How do you do sessions in Web Sites

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-18 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found