Cookies JavaScript Code Snippets

These snippets all create JavaScript Cookies. Cookies are small bits of information such as a name, a date, an order, etc. JavaScripts can set cookies on a user’s hard drive and retrieve them later, when needed.

Results via Envato Market

This script sets a cookie, with an alert window that only comes up the first time you visit the page each day. Good for calling attention to daily specials and news updates. Can be configured to work in other ways also.

When a page has performed it’s purpose, a cookie can be set to redirect the browser to a different page on subsequent visits. Easily implemented.

Bead crumb trail navigation (like Yahoo) is becomming very popular. This script will remember create a bread crumb trail for your visitors to help them navigate your site better.