What are cookies, how do they work, and why are they needed?

Lord777

Professional
Messages
2,583
Reputation
15
Reaction score
1,302
Points
113
A quick guide to managing your online privacy.

The word "cookie "is translated from English as"cookie". However, we will not talk about flour confectionery products in this article.

Cookies are widely used on websites and are an important component of the modern Internet. They are very useful in many ways and make the user experience of interacting with websites better, but they can also pose a threat to privacy and personal information.

Now we will look at what cookies are, why websites use them, how they work in the browser, and how to reduce the risks of using them.

What are cookies?
In simple terms, cookies are data that is stored in the memory of your computer or mobile device when you visit websites. They are stored as plain text files and are used to help the website remember user information. For example, their Internet preferences or authorization data.

Any data that is stored in cookies is created by the web server each time you visit the site. They are marked with a unique identifier that helps the server and site understand what information to provide to the user.

How do cookies work?
When you first visit a particular website, the server sends a specific cookie to the device from which the connection was made. Each time you visit the same site again, the browser sends this cookie back to the server to identify the user. And the server, in turn, outputs a version of the site adapted to the previous session history.

Why do websites use cookies?
Cookies are used by websites for a variety of reasons:

Personalization. Cookies help the website remember the user's personal information and provide data based on their preferences. For example: a website may use cookies to remember that the user's preferred language is English and the user's preferred interface theme is dark. The site will automatically open in this view each time, thanks to the cookie technology.

Convenience. Enabling cookies can make it easier for users to access their accounts on the site. Since cookies can contain data with registration information, the user will not need to enter their credentials every time they visit the site. The session will be saved until the user logs out of the account or clears cookies in the browser.

Tracking. Marketers often use cookies to track users who open certain pages and otherwise interact with the site. This information can be used to improve server performance or better understand user behavior on the site.

Targeted ads. Cookies are often used to serve ads based on your browsing history. For example, if a user has visited a website to learn about an upcoming tourist trip, this cookie can be used to display ads for travel services on other websites that are combined in a common network. According to this principle works, for example, Google ads or Yandex.

What types of cookies exist?
There are two common types of cookies that websites use:

* Persistent cookies

Permanent cookies are used for authentication and personalization of site browsing. They contain information about the user's login credentials, settings, theme selection, and language preferences. A good example of persistent cookies is the shopping cart in an online marketplace. You don't even need to create an account on the site, but you can add the desired products to your shopping cart, and they won't disappear the next time you visit the site.

* Session cookies

Session (temporary) cookies are created by the web server and used to store information about the current user session. Session cookies store information about the user's movements on the website and track the data entered only during the active session. At the end of the session, these cookies are deleted from both the device and the web server.

Should I disable saving cookies or delete them manually?
Whether it's worth it or not — everyone decides for themselves. Many users disable cookies on all sites in order to provide more privacy and anonymity on the Internet. In any case, this may affect the user experience when browsing the site, since deleting cookies will reset user settings and preferences that are not stored on the server.

Below are instructions for setting up and managing cookies in popular browsers:

Can cookies be harmful or dangerous?
The data in cookies is not dangerous in itself and cannot be used for malware infection. However, if the cookie data falls into the wrong hands, attackers can gain access to browsing sessions, steal personal information, or otherwise abuse the cookies.

There are documented cases where attackers stole a user's valid cookies and intercepted their active session, which gave them full access to the victim's account.

Although most sites automatically log users out after a certain period of inactivity, sometimes it's worth playing it safe. For example, if we are not talking about the account of an ordinary user, but about the site administrator, you should regularly clear cookies so that they can not be used by intruders.

What is "cookiestuffing"?
When talking about cookies, it is also worth mentioning "cookie stuffing"or" cookie substitution". This method is called the introduction of hidden iframes with affiliate links by attackers on a hacked website. For example, hackers were able to hack the site of a popular marketplace and changed its code, introducing a referral system that pays commission fees for purchases. When visiting hacked pages, cookies with third-party code that includes referral links will be loaded in the background, and if the user makes any purchase on this marketplace, the attackers will receive affiliate income. For the user, this type of fraud is harmless, but for scammers it is a real gold mine.

Should I allow the use cookies on all websites I visit?
As mentioned earlier, the use of cookies can significantly improve the user experience of interacting with websites. Especially those that are visited regularly. However, the issue of data privacy has been raised more frequently in recent years, and more sites are using cookies.

Please read the list of pros and cons of cookies so that you can make an informed decision on this issue.:

• Advantages:
Online purchases. Almost all e-commerce sites allow users to put items in their shopping cart and not lose them when they visit the site again.

Submitted forms. Cookies can store information sent on the site, such as your name, phone number, email address, etc. This can save valuable time when using the site later.

Personalization. Cookies help you save site settings that are user-friendly. For example, the language, interface theme, and so on.

Recommended content. Cookies are widely used for recommendations. For example, they can be compared with data from other users who have a similar profile, and then used for personalized offers of certain products or services. Sometimes this is useful.

Security authentication. On sites with cookies disabled, you will have to log in to your profile every time you visit them again. Therefore, using cookies in this situation makes the user experience more convenient and saves time.

• Disadvantages:
Confidentiality. Most browsers are configured to store cookies by default. And since cookies can also be stored on a web server and used by third-party sites, the history of pages visited by the user and the IP address may become public under certain circumstances.

Local storage. Website cookies occupy a specific location in the device's local storage. If you do not clear cookies at all for a long time, the space taken up by the browser may cause a lack of memory on the device.

Unauthorized data collection. Unscrupulous website owners may sell the information collected by cookies to third parties or use it to hack social networks or other online accounts.

Conclusion
The use of cookies certainly has its advantages, but it is also not without its disadvantages. Do not neglect to regularly clear cookies on your devices to protect yourself and your data.
Google, for example, has announced its plan to phase out all third-party cookies in Chromium-based browsers by 2024, with plans to use a different technology that spares more user privacy. This step says a lot and makes you think about the feasibility of using cookies in the current Internet reality.
 
Top