What is a computer cookie?
A computer cookie, often called an HTTP or browser cookie, is a small text file that a website stores on your device through your web browser. It lets the site remember information about you, such as whether you are logged in or what is in your shopping cart.
How cookies work
When you visit a website, it can send a small piece of data to your browser. The browser saves it and sends it back each time you return to that site.
This helps websites recognize you between visits and between pages.
Types of cookies
Session cookies are temporary and are deleted when you close your browser.
Persistent cookies stay on your device until they expire or you delete them. They can remember your login, language or other settings.
First-party cookies are set by the website you are visiting.
Third-party cookies are set by other companies, often advertisers, whose content appears on the page. They can be used to track your activity across many sites.
Privacy
Because of tracking concerns, many browsers now block some third-party cookies by default.
Laws in the European Union and elsewhere require many websites to ask permission before using non-essential cookies, which is why cookie banners are so common.
History and name
Lou Montulli, an engineer at Netscape, created web cookies in 1994. The name came from the term magic cookie, used by programmers for a small piece of data passed between programs.