What Are Computer Cookies and How Do They Work?
Everybody loves a fresh-baked chocolate chip cookie. But the ones that we’re talking about aren’t for eating.
However, computer cookies can also provide an amazing, lavish experience — to your site visitors, of course. Incorporating computer cookies into your site can help you provide the best experience for your visitors online.
That said, what are computer cookies, and how do they work? We’ll cover that and more in this article, so read on!
For more website security tips and tricks up for our newsletter, Revenue Weekly!
What Are Computer Cookies?
Computer cookies are small bits of code designed as a way for websites to remember information about your website activity.
Computer cookies are also called web or website cookies, Internet cookies, browser cookies, or more formally HTTP cookies.
How do website cookies work?
Instead of storing multiple users’ browser activities on their servers, websites instead send bits of code to be stored on user’s browsers.
Each time you visit a new website, the website sends computer cookies with unique identifiers (often a number ID) to your browser, which stores it within the browser settings in a section often labeled “Cookies.” A website will typically warn you if they’re using cookies, and you can sometimes opt out of them.)
Each time you request a new page from the site, the computer cookies are sent back to the site’s server, which helps the website remember you and your online preferences and habits.
Cookies can remember things like which buttons you clicked or which pages you’ve visited. They can even help you fill in form fields you’ve previously entered in the past (things like name, address, password, payment information, etc.).
The benefit of storing website cookies on a user’s browser instead of a website’s server is that it helps unload the amount of data stored on the server. The result is a faster server since it doesn’t have to store as much data on large amounts of visitors.
What do computer cookies do?
Computer cookies have several functions. Their primary purpose is as an easier way for websites to track browsing data. Websites use that data to:
- Provide users with easier access to accounts: HTTP cookies allow browsers to remember login information for sites. That way, if you log in to sites like social media or email accounts, the cookies will remember your info so you won’t have to log in every time.
- Remember information such as items in shopping carts: HTTP cookies also help browsers to remember items placed in shopping carts on ecommerce sites. Even if you click on a link, press the back arrow, or leave the site, your browser knows you still have items in your cart. Without cookies, your shopping cart would reset to zero each time you performed one of those actions.
- Track visitor counts: Each computer cookie a website places has a unique ID. Using a cookie’s ID, websites can track how many unique visitors there are on their site. Even if you visit a site more than once, you’ll still be counted as the same individual since your cookie has the same ID. This lets websites collect more accurate data about how many unique visitors there are and the type of activities they take while on the site.
- Deliver relevant information and advertisements: The online advertisement industry finds website cookies especially useful to serve Internet users with relevant ads. Since cookies are stored on visitor’s browsers, they can track which sites visitors head to after they leave your site. If you have permission to show advertisements on one of those sites they visit, you can deliver relevant advertisements while they’re on the page and remind them of your brand.
Types of computer cookies
There are three main classifications of computer cookies determined by the types of activities they track.
Persistent cookies sometimes referred to as authentication cookies, are cookies that come with an expiration date.
These types of cookies track and store data for an extended amount of time. The duration is set by the web developers and can span anywhere from days to years after your initial visit.
During the duration of the cookie, it continuously sends information to the website it belongs to every time the user visits the site or view its assets (such as advertisements).
Because of their long-term nature, persistent cookies are used to track user activity data on the site over time and store usernames and passwords that let you stay logged in even after you leave the site.
Since they can track whether you are logged in and with which account, persistent cookies also help websites determine if they can safely send pages that contain sensitive information.
Persistent cookies can sometimes cause privacy and safety concerns, but if a site encrypts its data and cookies, then sending cookies to users’ web browsers is much safer and more secure.
Also called transient cookies, in-memory cookies, or non-persistent cookies, session cookies are temporary. Session cookies get deleted whenever a user ends their Internet session by closing their web browsers.
Session cookies track a visitor only when they are actively interacting with a site, and they’re often the type of cookie that keeps track of information like the items you’ve placed into your shopping cart.
Browsers can tell session cookies from other cookies because they lack an expiration date. When a browser identifies that there is no expiration assigned, it will delete them after the session is over.
Third-party cookies, also called tracking cookies, track your browsing behavior across the web, most often for advertising data.
Each type of computer cookie is identifiable by the domain name they belong to. For example, if you had a site called www.yoursite.com, the cookies associated with your site would be called www.yoursite.com within browser settings.
Cookies that match the domain name of the site they come from are called first-party cookies. On the other hand, third-party cookies are identifiable because they have different domain names than the site that sets them.
Third-party cookies are the reason you can look at air fresheners on one site and see ads for air fresheners later on a different page or on social media. Those pages agree to set cookies and display advertisements from other websites.
Most web browsers will let you block third-party cookies in their settings, and some, such as Apple’s Safari or Mozilla’s Firefox, block third-party cookies entirely. Google also has stated that it will also phase out third-party cookies by 2022.
How to manage cookies on Chrome
In Chrome, there are a few different settings dealing with managing your cookies. You’ll first need to open up the Privacy and Security section within Chrome settings:
- Open Chrome
- Click the stacked dots in the top right corner of your browser
- Select Settings in the drop-down menu (near the bottom)
- Expand Advanced Settings in the navigation menu on the left side of the screen
- Select Privacy and Security under Advanced Settings
To clear browsing data (history, cache, and cookies):
Within the Privacy and Security section, you’ll need to:
- Select Clear Browsing Data (bottom of the Privacy and Security section)
- From there, you can select whether you want to delete cookies, history, or cache, as well as from a time period ranging from the last hour to all time
- You can also head to the advanced tab for more in-depth options (such as clearing passwords)
To edit cookie permissions:
Within the Privacy and Security section, you’ll need to:
- Select Site Settings (second from the bottom of the Privacy and Security section)
- Select Cookies and Site Data
- Here you can choose not to allow sites to set cookies, block third-party cookies, and clear cookies when you quit Chrome
- Selecting See All Cookies and Site Data will allow you to delete cookies individually
Deleting cookies will cause your browser to forget your browsing history, including your session login information, so you’ll be logged out of any site you previously logged in to.
Are cookies bad or good for computers?
For the most part, cookies do a great job of helping improve user experience.
It’d be tedious to have to log in again every time you left a site, shopping would be difficult if browsers couldn’t remember what you selected, and ads would be more annoying since they would be less applicable to you.
Cookies themselves can’t harm your computer either by containing viruses or malware. But as with any piece of technology, people can take advantage of them and use them maliciously, in some cases using cookie data to impersonate another user and access their account.
To prevent misuse and hijacking of HTTP cookies, and to protect you and other’s information, it’s important that your browsers, servers, and website have the necessary security and information encryption and protection measures such as a virtual private network (VPN) and Transport Layer Security (HTTPS protocol).
Are you still curious about computer cookies?
WebFX can help you on your path to discover the full depths of the question, “What is a computer cookie.”