Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Read Cookies from multiple domain
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Read Cookies from multiple domain

 Post Reply Post Reply
Author
sherwood168 View Drop Down
Newbie
Newbie


Joined: 23 July 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote sherwood168 Quote  Post ReplyReply Direct Link To This Post Topic: Read Cookies from multiple domain
    Posted: 23 July 2003 at 11:22am

Is it possible to modify the program to read cookies from multiple domain? for example, if the current forum is located at http://www.sherwood.com/forum, however, this url also aliased to http://forum.sherwood.com. Is it possible for users continue to use the settings?

Thanks,

Sherwood

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 11:29am
you will need to set the cookie domain to simply
"sherwood.com" and set the path to "/"
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 12:05pm
I don't think that is possible though. It is seen as a seperate domain when you have a subdomain. It would be bad is customer1.isp.com could read the cookies of customer2.isp.com
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 12:25pm
In the example above customer1 and customer2 could only read each others cookies if the domain was set to simply "isp.com" by default the domain is set to the domain (and sub domain) from which the cookis is set however if you set the domain name to simply the domain without a sub domain then it is accessible for any sub domains because cookies aren't accessible across domains (not sub domains).

If you go to webwiz.net you will note that you are not logged into the forum, if you logged in at www.webwiz.net.

Go back to www.webwiz.net and log out. Now go to webwizwguide.info and log in. Now return to www.webwiz.net and note that you are logged back in. Furthermore if you try to log out at www.webwiz.net you can't, and you need to go back to webwiz.net to log out.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 3:39pm
bummer. Thanks Jamal
Back to Top
sherwood168 View Drop Down
Newbie
Newbie


Joined: 23 July 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote sherwood168 Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 3:42pm
But how to change the source code to place the cookie at "/"?
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2003 at 4:46pm
The syntax is
Response.Cookies("cookie").Path ="/"
Response.Cookies("cookie").Domain ="domainname"

where cookie is the name of your cookie and domainame is the your domain (with or without the subdomain).
Back to Top
SiteMaster View Drop Down
Newbie
Newbie


Joined: 29 August 2005
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SiteMaster Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2005 at 6:50am
okey but i still get the error, where in the code do i put it
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.