Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Cookie

Status
Not open for further replies.

biotix

Programmer
Jun 16, 2007
2
AU
I need a javascript to go on the splash page of my website.

I want it to set a cookie to say that you've been there. So when you go back to my site, the script will look to get the same cookie back, and skip the splash screen.

It would be cool if the user could enter there name in a prompt, and then when they come back an alert says "Welcome back, (name)".

The cookie should never expire.

Could someone please write a javascript to do that, or atleast help me.

Thanks.
 
Hi

You already got the solution from Nick, but I would like to add a few words.
biotix said:
I need a javascript to go on the splash page of my website.
Splash pages, especially those with useless Flash animations are in the tops of most annoying web practices. Unless the splash has to warn about adult content, I suggest to remove it. Personally I never enter my name in such childish welcoming game.

And hopefully you do not want to force the new visitors to visit your site starting from the splash page. That is even more annoying.
biotix said:
The cookie should never expire.
Yes, but even if never expires, it can be removed. The browsers does not keep an infinite list of cookies and when needed, they delete the oldest unused ones.

Feherke.
 
Thanks for your help. I got exactly what i needed.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top