michellem has asked for the wisdom of the Perl Monks concerning the following question:
I've been using the standard method for setting cookies using perl/cgi:
And I'm trying to read the cookie using javascript (via document.cookie), but although it is clear that the cookie is set (looking at the magic cookie file), a javascript function can't read it (document.cookie is empty). What am I doing wrong?$logincookie = $co->cookie ( -name=>'ST', -value=>'test', -expires=>'+30d' -path=>'/', -domain=>'www.strategictechnology.net', -secure=>0 ); print $co->header(-cookie=>$logincookie);
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How can I get Javascript to read CGI-generated cookies
by r34d0nl1 (Pilgrim) on Dec 14, 2004 at 13:43 UTC | |
Re: How can I get Javascript to read CGI-generated cookies
by Trimbach (Curate) on Oct 30, 2000 at 23:36 UTC | |
Re: How can I get Javascript to read CGI-generated cookies
by michellem (Friar) on Oct 31, 2000 at 10:56 UTC | |
Re: How can I get Javascript to read CGI-generated cookies
by little (Curate) on Oct 31, 2000 at 13:58 UTC |
Back to
Seekers of Perl Wisdom