A cookie is limited to a small amount of data and can only be read by the website that created it.
Written inside each cookie are pairs of values, consisting of a keyword and some associated data.
To avoid the size limitations of cookies, some websites will store a unique identification code in a cookie, and the remainder of the data in their own databases.
Cookies are generally used to:
- Store and maintain user preferences for a website
- Determine who are new and returning visitors
- Track user behaviour (analytics)
- Store items in shopping baskets
- Store log-in details
- Help advertisers show relevant targeted website adverts
Cookies can be disabled in your browser settings, however this could make some websites unusable (e.g. e-commerce).
Session cookies are temporarily stored in RAM and not actually saved to your hard drive.
They are automatically deleted once you have finished your session browsing a website and you close the web browser.
Online shopping baskets will usually make use of session cookies.
Persistent cookies are stored on your hard drive until they are either deleted or reach their expiry date.
This means they will remain available on your computer after you close the browser or reboot the machine.
This is needed for most of the functionality mentioned above.