This script sets a cookie, with an alert window that only comes up the first time the visitor visits the page each day. Good for calling attention to daily specials and news updates.
Simply put this code snippet in your document HEAD area.
If the visitor has not visited your page that day, an alert prompt will spawn.
Go ahead, close this window and return to see that there is no alert prompt. (if cookies are enabled)
[ This code example from Daily Welcome Cookie Code Snippet page. ]