Code to Utilize Cookies
Basic cookie functions from JavaScript Tip Of The Week.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Cookie Cutter
A cookie script from Builder.com.
Requires Netscape 3.0+ or Internet Explorer 3.0+.
Cookie Counter
Count the number of visits for each user.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Favorite BG Color
Let a JavaScript cookie remember your favorite background color. On future visits, it automatically displays that background color for you.
Personal Visit Counter
From The JavaScript Planet.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Play an Online Mad-Lib
A script that uses cookies with JavaScript to make a mad-lib.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Remember and Display a Person's Name
Have a user enter their name once, and display it every time they return to your page.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Setting a Cookie With JavaScript
A plain page containing nothing but a script to set, read and delete a cookie.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Store Cookies in Arrays
Code to store cookies in arrays from JavaScript Tip Of The Week.
Requires Netscape 3.0+ or Internet Explorer 4.0+.
User Name
This cookie records the visitor's name.
Visits
This cookie records how many times the visitor has visited the page.
Welcome New Visitors With a Special Page
Code from JavaScript Tip Of The Week to welcome new visitors with a special welcome page.
Requires Netscape 2.0+ or Internet Explorer 3.0+.
Write Cookie Example
From Netscape's DevEdge Library.
Requires Netscape 2.0+ or Internet Explorer 3.0+.