Cookies problem, I believe it has to do with domains?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-16-2005
martinsgattoni@gmail.com
 
Posts: n/a
Default Cookies problem, I believe it has to do with domains?

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.

Reply With Quote
  #2 (permalink)  
Old 05-16-2005
Mike Willbanks
 
Posts: n/a
Default Re: Cookies problem, I believe it has to do with domains?

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
Reply With Quote
  #3 (permalink)  
Old 05-17-2005
Alvaro G Vicario
 
Posts: n/a
Default Re: Cookies problem, I believe it has to do with domains?

*** 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
--
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0