Cookies
The main difference between a cookie and a session is that a cookie is stored on your computer, and a session is not. Although cookies have been around for many years and most people do have them enabled, there are some who do not. Cookies can also be removed by the user at any time, so don't use them to store anything too important.
Cookies need to be set in the header. This means they must be sent before any HTML is set to the page, or they will not work.