Yep, that code should work just fine. So something is different on the new server. I looked around and found the following tips:
- If the date/time is not set correctly on the new server you may be setting cookies that immediately expire. I don't think that's it but it's worth checking.
- Might be just you, see
(if you'd like to make the testing file public I'll be happy to try it).
- Looks like some people have issues getting cookies to set the first time with AOL, any chance that's involved?
- Some people suggest putting the optional attributes in (domain, path), have you tried that?
- If you set it to expires="NEVER" will it work? Read something about that working where others fail.
- Does it not work in all browsers? Read about problems with IE and frames.
- Is there a proxy involved on this second server (or any load balancing not like the first server)? See
Hate to say it Lotruth but I think I'm at the end of my help with this one! My advice is to post the code for those two pages that you just posted, and tell them the symptoms. No reason I can think of why those test pages shouldn't work. Might also help your cause to make the testing pages live that don't work for you, so others can test them and give you their results.
Sorry! Let me know what happens, I'm interested...