What is a Browser Cookie?
BACK TO BLOGSWe’ve recently been hearing about tracking cookies and laws in the European Union forcing websites to explain their use of cookies to their visitors. If you’re wondering what cookies are and what all the fuss is about, you’re not alone.
Cookies are an important browser feature – if you disable cookies, you’ll find yourself unable to log into websites. While cookies have important, good uses, they also have more questionable uses.
What’s a Browser Cookie?
Cookies are small pieces of information websites store on your computer. Cookies only contain bits of text, not anything else. The text can be a user ID, session ID, or any other text. For example, web pages can be configurable – a web page could have a Hide link that hides a certain element on the page. The page can save this setting on your computer with a cookie. When you load the page in the future, the page can examine the cookie and automatically hide the element.
If you clear your cookies, you’ll be logged out of all websites and websites won’t remember any settings you’ve changed on them.
Cookies are very common – you probably have hundreds or even thousands stored in your browser right now.
How Cookies Work
Your web browser stores and manages cookies. You can find a list of websites storing cookies and view the cookies themselves – although it’s usually not interesting to look at the content of the cookies – in your browser’s settings. If you use multiple web browsers on your computer, each browser has its own set of cookies.
Websites are only allowed to look at their own cookies – for example, when you visit How-To Geek, we can’t examine cookies from other websites. This prevents malicious websites from snooping and stealing your login sessions.
Good Uses for Cookies
As we’ve seen, cookies have a number of very important uses. The web wouldn’t be what it is without them today.
- Cookies store your login state. Without them, you wouldn’t be able to log into websites. Websites use cookies to remember and identify you.
- Cookies store preferences on websites. You couldn’t change settings and have them persist between page loads without cookies.
- Cookies allow websites to provide personalized content. For example, if you’re shopping on Amazon, Amazon can remember the products you’ve browsed and recommend similar products – even if you’re not logged in.