scriptygoddess

10 Oct, 2002

Netscape Cookies…

Posted by: Jennifer In: Lessons learned

I've been having a problem for a long time setting cookies on Netscape. This morning, with some downtime on my hands I finally figured out what the deal was. It was this comment in the PHP manual that finally turned the light on for me:

Netscape cookie spec says that you need to specify a DOMAIN with two periods – screw all the redirection to www.domain.com.

Use DOMAIN=.domain.com

or actually in php you'd just use
setcookie("TEST",$VALUE,time()+60,"/",".test.com");
THAT did the trick!!

Another thing you should know – (I actually knew this from before (after an agonizing trial and error), but I'm writing it down should I ever forget): If you try to set a cookie and ACCESS the value of that cookie in the same "page load" it won't work. It'll see the cookie the next time the page is loaded… but it won't see it in the same "session" as setting the cookie.

Now, please excuse me while I dig through some of my cookie-related scripts here and make this fix… =sigh=

No Responses to "Netscape Cookies…"

Comments are closed.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements