Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: How do you do sessions in Web Sites

by awwaiid (Friar)
on Sep 27, 2005 at 22:32 UTC ( #495576=note: print w/replies, xml ) Need Help??


in reply to Re: How do you do sessions in Web Sites
in thread How do you do sessions in Web Sites

3) Put them in a hidden field, and only allow communcication to the server through POST (submitting the form).

Just for completeness :)

  • Comment on Re^2: How do you do sessions in Web Sites

Replies are listed 'Best First'.
Re^3: How do you do sessions in Web Sites
by salvix (Pilgrim) on Sep 28, 2005 at 13:58 UTC
    Just remember that if you use POST for every page, depending on their browser (mis)configuration or browser (mis)behaviour, you will basically break the browser "Back" button.

    It's going to ask the user every time s/he hits "back" with that annoying message, "do you want to re-submit this form?", and the users will probably be confused and not know what to do. :(

      Very good point. On plus side of useability for always-post, you get all the data they are currently working on.

      Imagine a page with navigation bar at the top and a user is filling out the form. Even the navigation bar secretly uses POST buttons/links. Since we always POST, we even get their partially filled form so that when they click 'Home' or something we can ask 'Are you sure you want to leave the form half-completed' and keep all their data and everything.

      But the back button thing does freak people out.

        Yeah, the back button thing is a long-standing hate of mine. Opera manages to work around this by just caching the pages. When you go back, it opens the page from the cache. Perhaps in a small number of cases this is somehow wrong and you need to refresh (in which case, the 'Refresh' button usually does the trick) but 99% of the time, this just works, is useful, and lets you usefully look back at data in, for example, multipage sign up/purchase forms without having to continually repost.

        It completely baffles me that the other major browsers don't do this.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2021-09-19 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?