Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Is there any method

by Anonymous Monk
on Feb 07, 2007 at 07:22 UTC ( [id://598696]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Is there any method
by shmem (Chancellor) on Feb 07, 2007 at 08:46 UTC
    If the browser disables cookie, in that case how can we achieve the result(without creating cookies)?

    "If I'm not telling you, in that case how can you answer(without guessing)?"

    Well, shooting into your general direction: encode the session key into the URL.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Is there any method
by fenLisesi (Priest) on Feb 07, 2007 at 10:28 UTC
    If you are trying to maintain state without using cookies, one way would be to use hidden fields. If you choose to use them, keep sensitive data on the server side. If you put data other than a session key in hidden fields, it may then be a good idea to generate a salted hash of the data you will be sending to the browser in hidden fields, put that hash in a hidden field, too, and then regenerate the hash when the data comes back to you with the next click and check it against the incoming hash.

      The problem with hidden fields is that they don't get sent to the server when following links, only when submitting a form. There is a JavaScript workaround, but if the user is blocking cookies, he could very well be blocking JavaScript too.

      The alternative is to attach the state info to every link on the page (e.g. http://example.com/page.html?s=1735273725117325), but that can make it hard for users to share URIs safely. You could bind the session to an IP address, but that would prevent some users from accessing your site.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Is there any method
by ambrus (Abbot) on Feb 07, 2007 at 09:57 UTC

    Print a big red warning message for the user to enable cookies in their browser, explaining that your site won't work if they don't (and then make sure it really doesn't work). Possibly include instructions for the major browsers.

Re: Is there any method
by GrandFather (Saint) on Feb 07, 2007 at 07:27 UTC

    What result? Where is the Perl content in the question?


    DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found