This is a discussion on Cookies problem, I believe it has to do with domains? within the PHP Language forums, part of the PHP Programming Forums category; Gretings, I hope someone can help me to clarify this: I have an application with cookies, it works fine when ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Gretings, I hope someone can help me to clarify this:
I have an application with cookies, it works fine when I browse it. The thing is that this app will be shared by different pages (different domains). When I browse it from other domain (inside a frame).. It stops working. Is this because it is being called from a different domain? Shouldnt work anyway because the app works by itself? It doesn´t share the cookie with other pages. I´ll apreciate any help on how could I solve this problem! Greetings. Drakon. |
|
|||
|
Drakon,
> The thing is that this app will be shared by different pages (different > domains). When I browse it from other domain (inside a frame).. It > stops working. Cookies can not be shared across domains. The cookie is normally set for that domain only and the browsers will not allow other pages access because it could be a huge security vunribility. As for a workaround you could possibly send the current cookie to the other page that is in another domain either by javascript or using php and sending all of the items in the cookie with it. This is the only thing I could see as a workaround. Mike |
|
|||
|
*** martinsgattoni@gmail.com wrote/escribió (16 May 2005 08:09:54 -0700):
> Is this because it is being called from a different domain? Cookies are always attached to a domain and (optionally) a directory. Several reasons for that: * Browsers don't need to waste bandwidth sending *all* cookies stored in the computer with every HTTP request. * Sites don't overwrite other's cookies. * Your private info stored in cookies is not sent to every site you visit. If you need to create a cookie and read if from other sites, you can create one different cookie per site (with the same value), but you must be aware that some browsers block third-party cookies by default. -- -- Álvaro G. Vicario - Burgos, Spain -- http://bits.demogracia.com - Mi sitio sobre programación web -- Don't e-mail me your questions, post them to the group -- |