Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 1 Cookie for Multiple Domains
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 03 April 2008 :  04:47:28  Show Profile
I'm think I need a compact privacy policy here but I'm not entirely sure (nor am I too clear on how to create one) but I have 3 domains pointing to one website and would prefer the 3 of them to share the same cookie rather than putting the members through the inconvenience of having to log in again if they happen visit the site through a different domain. For each domain, the cookie would need to be accessible from domain.tld as well as www.domain.tld.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 03 April 2008 :  06:55:55  Show Profile  Visit MarcelG's Homepage
I've explored this too a while ago (so set the same cookie for oxle.nl and oxle.com (and the www versions), and indeed, a CPC was what I found out for that.
Without CPC, but with PHP this may help you out: http://www.perlmonks.org/?node_id=187814

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 03 April 2008 06:56:46
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 04 April 2008 :  07:38:15  Show Profile
Got around the subdomains with the following line, which I should've known:
response.cookies("cookie").domain="."&replace(request.servervariables("server_name"),"www.","")
After some more research it doesn't look like there's an easy way to share cookies across domains without using some complex and ugly hacks.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 04 April 2008 :  08:38:53  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by Shaggy

Got around the subdomains with the following line, which I should've known:
response.cookies("cookie").domain="."&replace(request.servervariables("server_name"),"www.","")
After some more research it doesn't look like there's an easy way to share cookies across domains without using some complex and ugly hacks.




Makes sense too, cookies are meant to be domain specific...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20577 Posts

Posted - 04 April 2008 :  09:35:13  Show Profile  Visit HuwR's Homepage
could open some ugly security problems if you were allowed to write cookies for one domain while in another, probably much better to have a generic redirect so if they come in via one domain you redirect and send them to the right domain
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07