Hey, it worked !!<br>
I am not really sure, I think I've tried setting the domain before but it didn't work at that time, but I've never set the path before so perhaps that was the problem.<br>
<br>
Anyway, yeah, just as you said, it's better to read the documentation more patiently next time before bumping myself to such problems.<br>
Thanks a lot for the guides and advice, Mitch !<br>
<br>
Sindharta<br>
<br>
<b>Mitch Jackson <perimus@gmail.com></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On Mon, Jun 2, 2008 at 11:54 PM, <sindharta_tanuwijaya@yahoo.co.jp> wrote:<br>
> So does it mean that Javascript will regard different ports on the same<br>
> domains as having the same domains while Catalyst apps will treat different<br>
> ports as different domains ?<br>
<br>
Cookies are not different depending on the programming language<br>
(although some browsers will behave differently). Cookies are just<br>
pieces of text passed with HTTP headers. Once you get how that works,<br>
the feeling of 'cookies are this magic thing' goes away and you can<br>
troubleshoot them easily.<br>
<br>
In your javascript, you're setting your 'domain' field without a port<br>
number. In catalyst you are not specifying a domain field. Have you<br>
tried setting your domain field in catalyst the same way?<br>
<br>
Learn to find what you're looking for by treasure hunting into the<br>
documentation:<br>
<br>
The documentation of the cookies method for catalyst tells you it<br>
handles cookie objects with CGI::Cookie.<br>
http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7014/lib/Catalyst/Request.pm#$req-%3Ecookies<br>
<br>
If you look at the documentation for CGI::Cookie, you will see you can<br>
set: name, value, expires, domain, path, httponly and secure<br>
http://search.cpan.org/search?query=CGI%3A%3ACookie&mode=all<br>
<br>
$c->response->cookies->{testcookie} = {<br>
value => 'iamatestcookiemonster'<br>
expires => time()-86400,<br>
domain => 'sin.my.office.com',<br>
path => '/',<br>
httponly => 0,<br>
secure => 0,<br>
};<br>
<br>
Kind Regards,<br>
<br>
/Mitchell K. Jackson<br>
<br>
_______________________________________________<br>
List: Catalyst@lists.scsys.co.uk<br>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<br>
Dev site: http://dev.catalyst.perl.org/<br>
</sindharta_tanuwijaya@yahoo.co.jp></blockquote><br>
<div style="line-height: 0; width: 0; height: 5px; clear: both;"> </div>
<p> 
<hr size=1><a href=http://pr.mail.yahoo.co.jp/toolbar/ target="new">Power up the Internet with Yahoo! Toolbar.</a><br>