Hello all,

I've been reading JS cookie tutorials like mad, but cannot quite get this right. It should be a simple script to write, but I'm not getting a handle on it. So I turn to the gurus here for some help!

I want a JS script on an index.html page that redirects a user to another page automatically (that's the easy part, and I'd just use meta-refresh if that's all I wanted). But I need to redirect them the first time only, and then if they have been there before, not redirect them. So I want the index page to check if a cookie exists and if not, redirect the user. If there is a cookie, it simply does nothing. The index page would also need to set the cookie the first time, obviously.

Can anyone point me to a script that does this, or point me to a tutorial that lays it out clearly? I would appreciate it very much.

Thanks so much,