[RESOLVED] [2005] Cookies on 2 different domains
Hello everyone,
I'm working on a website that runs on 2 different domains and I noticed that
whenever I try to set a cookie I noticed that I have to set the domain before changing the value within the cookie or else the browser won't allow the modification
I have 2 questions:
1- What's causing that?
2- How can I fix this issue? because it's pretty annoying to have to set the domain every time I need to change the value within the cookie.
Thanks in advance guys
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by ComputerJy
1- What's causing that?
Security.
Quote:
2- How can I fix this issue? because it's pretty annoying to have to set the domain every time I need to change the value within the cookie.
You can't. It's security.
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by mendhak
Security.
You can't. It's security.
A little explaination!!
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by ComputerJy
A little explaination!!
Well, I think he was expecting you realize it is to prevent a website one domain from using a cookie from another.
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by superbovine
Well, I think he was expecting you realize it is to prevent a website one domain from using a cookie from another.
I know that
but why does that happen?
and How can I fix this?
Those were my questions
Re: [2005] Cookies on 2 different domains
Because no-one except you knows that example.com is the same site as somecompletelydifferentdomain.com.
Re: [2005] Cookies on 2 different domains
Thanks a lot guys.. It's starting to make sense now
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by ComputerJy
I know that
but why does that happen?
and How can I fix this?
Those were my questions
Why does that happen?
It is obivious, and was stated early.
How can you fix this?
Get both website on the same domain. That is your only option. There is no work around.
Re: [2005] Cookies on 2 different domains
Quote:
Originally Posted by superbovine
Why does that happen?
It is obivious, and was stated early.
How can you fix this?
Get both website on the same domain. That is your only option. There is no work around.
Thanks. but it's not my decision to take