I am using Javascript to set a Cookie and trying to read the cookie back using a Perl script on another page. The reason that I'm using JS is that I wish to allow a user to dynamically add things to a cookie on different pages for a shopping basket and then allow the user to download all the items off a single page.
I am setting the cookie in JS using the document.cookie method as follows:
where the cookie name is cookie and attempting to read the cookie using CGI.pm:var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie;
but it is reporting that no cookie is set. The cookie set and read scripts are in the same domain and from my reading of cookie standards, there should be no compatibility issues between Perl and JS.my $cookie_in = $query->cookie("cookie");
I'd appreciate any help,
Regards,
Kakaze
In reply to Perl reading Cookies Set by Javascript by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |