Re: deleting one cookie is deleting both..why? (tiny scripts)

From: Date: Thu, 17 Jul 2003 17:50:57 +0000
Subject: Re: deleting one cookie is deleting both..why? (tiny scripts)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155659@lists.php.net to get a copy of this message
--- Ryan A <ryan@jumac.com> wrote: > how do i make sure that the cookie will work for > http://best.... > and www.best... and blah.bestweb.... etc? because thats what I > thought I was doing by using .bestwebhosters.com If you are setting the cookie from bestwebhosters.com, the best way (my opinion) is to not specify the domain, so that the browser will use the current domain. This seems to be the most compatible across all browsers. If you want to specify the domain, you can try leaving off the leading dot, as in bestwebhosters.com. On *most* Web browsers, the cookie will be sent in requests for www.bestwebhosters.com also, but from hat I have read, this is less reliable. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/

« previous php.general (#155659) next »