1. Computing

Cookies

Cookies help you to keep track of things between visits to a page.

First Time
When you want something to happen the first time someone visits certain pages on your site in a given session and then not happen again inf they revisit in the same session you need to set a first time cookie.

Toggle Action
If you want to define alternate actions to be performed on odd and even numbered visits to a page you need a toggle action cookie.

Write Cookies
A quick look at all of the different values that can be used to write cookies of different types and a function that you can use to make writing cookies of any type easier.

Read Cookies
There's not much point in writing cookies if you can't read them back in. Here's a way to load all of the cookies on your site into an associative array where they are easier to access.

Delete Cookies
There is no actual delete command for deleting cookies once you have created them. Here's how to tell the browser to ignore the cookie which is effectively the same thing.

©2013 About.com. All rights reserved.