Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Determining if a cookie was accepted

by nop (Hermit)
on Feb 01, 2003 at 02:48 UTC ( #231785=perlquestion: print w/ replies, xml ) Need Help??
nop has asked for the wisdom of the Perl Monks concerning the following question:

Hi folks,
If a mod_perl script attempts to set a cookie, how can you determine at that time if the cookie was successfully accepted?
Thanks
nop

Comment on Determining if a cookie was accepted
Re: Determining if a cookie was accepted
by dempa (Friar) on Feb 01, 2003 at 03:06 UTC

    Cookies are sent in the http headers and if I'm not mistaken there's no way to determine if the client accepted or rejected them. The only thing I can think of is to check for the cookie next time the user requests a page (but that's probably not what you want since you write "at that time").

    -- 
    dempa

Re: Determining if a cookie was accepted
by PodMaster (Abbot) on Feb 01, 2003 at 03:08 UTC
Re: Determining if a cookie was accepted
by glwtta (Hermit) on Feb 01, 2003 at 03:38 UTC
    hm, I suppose after sending the header you could print a small javascript function that would send another request (lots of options there) to a script which, after checking what cookies it gets, would set a flag (with your favourite shared memory / IPC mechanism) for which your first script would have to wait.

    Though that doesn't sound like that good a solution to me... in fact, I don't even know if that would work, Monks?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-11 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls