in reply to Re: Re: Perl reading Cookies Set by Javascript
in thread Perl reading Cookies Set by Javascript

Cookies are a browser thing really, there is no standard how to implement them. It's even more vage for javascript cookies.

For debugging, check if you cookie is visible to javascript (a reload after you set it):

alert(document.cookie);

In your script, check if the cookie is available in the environment:

print $ENV{'HTTP_COOKIE'};

If the last example does display the cookie, something might be wrong with CGI.pm. An old version maybe?

Replies are listed 'Best First'.
Re: Re: Re: Re: Perl reading Cookies Set by Javascript
by kakaze (Sexton) on Jul 25, 2002 at 12:28 UTC
    Actually, that's exactly what I had done, the alert displays a cookie and the $ENV{HTTP_COOKIE} is empty which lead me to believe that JS is creatimg the cookie correctly but perhaps this is not being communicated to the enviroment variable. I'm pretty sure it's the latest version of CGI.pm but i'll grab a fresh copy and try again.