Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Get Cookies for Form Input

by superfrink (Curate)
on Sep 16, 2010 at 19:22 UTC ( [id://860386]=note: print w/replies, xml ) Need Help??


in reply to Re: Get Cookies for Form Input
in thread Get Cookies for Form Input

Depending on the domain names in the applications' URLs the second application may be able to read the contents of the cookie set by the first application.

If the first application runs at http://nonprofit.org/a/ and the second application runs at http://nonprofit.org/b/ then the second application will get the cookie data because the browser will send it via HTTP headers.

If the applications are on different subdomains like a.nonprofit.org and b.nonprofit.org then you may have to update the code that creates the cookie to specify the cookie's domain be nonprofit.org. That will tell the browser to send the cookie data to both applications. Of course then c.nonprofit.org will also get sent a copy of the cookie data when the browser visits it and that may not be desirable for privacy reasons.

Update: ++Your Mother is right about the path. For some more cookie information visit http://www.cookiecentral.com/faq/#3.2

Replies are listed 'Best First'.
Re^3: Get Cookies for Form Input
by Your Mother (Archbishop) on Sep 17, 2010 at 17:48 UTC

    This is not necessarily true. If the cookies contain path constraints and they differ, they will not be available to anything on different paths. And I'm not positive, been a long time since I had to do it, but I believe you have to set the domain to .nonprofit.org (leading dot) to make it available to subdomains.

Re^3: Get Cookies for Form Input
by Anonymous Monk on Sep 17, 2010 at 04:57 UTC
    Thanks for information.

    Everything is coming and going from the same domain, only different sub-directories. The sessions are timed and clicking 'logout' will overwrite the cookies.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://860386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-18 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found