We use cookies and similar technologies on our site to distinguish you from other users of our site, improve the functionality and effectiveness of the site.

What are cookies?

Cookies are small files consisting of letters and numbers that are stored by your browser on your device (computer, phone, tablet, etc.) if you agree to their use.


By using this site you agree to the use of cookies in accordance with the terms described on this page.

If you do not agree to our use of this type of files and similar technologies, then you should adjust your browser settings accordingly or not use our site. Please refer to the section below entitled , for further instructions

This notice provides you with information about how we use cookies and how you can control them. In particular, you accept the use of analytical, advertising and functional cookies for the purposes specified below.

For information about how we use your data, including any personal data processed by cookies on our websites, please see our Personal data processing policy.

Our use of cookies

We use the following cookies:

    Strictly necessary cookies. These are files necessary for the correct operation of our Site.

    Analytical/technical cookies. They allow us to estimate and count the number of visitors and to understand how they move around the Site while using it. This helps us make improvements to the site, for example, by optimizing the search for relevant sections, making it simple and effective.

    Functional cookies. These files are needed to recognize you when you return to the website. This allows us to personalize the content of the Site to suit your needs and remember your preferences.

    Targeting cookies. These cookies record your visits to the Site, remember the pages you visited and the links you followed. We use this information to ensure that our Site and the advertising displayed on it are as relevant to your interests as possible. We may also transfer for these purposes this information to third parties.

Please note that third parties (such as advertising networks or providers of external services such as web traffic analysis) may also use cookies. We do not control this process. These cookies are most likely analytical/technical cookies or targeting cookies.

You can block cookies by activating a certain setting in your browser, which will allow you to refuse the installation of all or some cookies. However, if you block cookies in your Internet browser (including strictly necessary cookies), you may lose access to all or several areas of our Site.

How long are cookies stored on my device?

Some cookies last from the moment you log on to the Site until the end of that particular browser session. When you close your browser, these files become unnecessary and are automatically deleted. These cookies are called "session" cookies.

Some cookies remain on your device between browser sessions and are not deleted when you close the browser. These cookies are called "persistent" cookies. The length of time persistent cookies remain on a device varies between cookies.

How to control or delete cookies

Most Internet browsers are initially set to automatically accept cookies. You can change your settings to block cookies or alert the user when files are of this type will be sent to the device. There are several ways to manage cookies. Please refer to your browser instructions to learn more about how to adjust or change your browser settings. If you disable the cookies we use, this may affect your experience on our Site. If you are using various devices To view and access our Site (e.g. computer, smartphone, tablet, etc.), you must ensure that each browser on each device is configured in accordance with your cookie preferences.

Other similar technologies

Like many websites, we use technologies similar to cookies. This gives us information about how our Site and its content are used by our visitors and allows us to determine whether our Site or other sites have been visited from your computer or device.

Our servers automatically read your IP address when you visit our Site and we may associate this information with your domain name or with the name of your Internet provider. We may also collect certain “clickstream information” related to your use of our Site. Clickstream information includes, for example, information about your computer or device, web browser, or operating system and their settings, the page that brought you to our Site, the pages and content you see and click on during your visit, when and for how long you do so, what you download, what sites you visit after you leave our Site, and keywords, which you entered on our Site or the sites from which you came to our Site.

Protection of personal information

If in use cookies and similar technologies changes will be made, we will post the information in these rules. Please check back periodically to see how online data collection practices and our use of this data continue to evolve. To contact us regarding these rules, you can write to email.

Cookie facilitates the identification of users based on their information and preferences, and provides a means of personalizing websites.

Cookies are pieces of text that are sent to a server for a web client, and returned by the client each time it uses that server. Typically, a cookie is text message, which is less than 255 characters. Cookie technology is used to authenticate website users, track session, and store user information.

Why is cookie technology used?

Cookies serve as a means to identify a specific user. Once a user logs into a website, cookies may be created to associate with the user's credentials. For subsequent visits by that user to a website, the cookie can let the site know that the user is authenticated. Thus, the user is protected from the monotonous task of filling out registration information every time he visits the site.

The second purpose of using cookie technology is to differentiate between users. Information relating to the user and his preferences may be contained in cookies. This makes it possible for websites to provide personalization to their users. Based on the preferences of a particular user, websites personalize the site's presentation and functionality depending on the user's preferences. Many websites offer verified users the ability to customize web pages and receive personalized appearance site.

How cookies work

  1. Translation of web pages between the server and browser occurs via the Hypertext Transfer Protocol (http). When the user enters the URL in address bar browser, the browser takes it and sends a request to the server, requesting web pages specified by the user.
  2. Next, the server sends the page requested by the browser as an http response. The response is sent in packets of text, which may contain a statement asking the browser to store a cookie. This is done through the statement, "cookie setting: name = value". The browser asks whether to save the string value "name" and return it to the server during any further calls to it.
  3. On any subsequent request to the same server, even when requesting a different web page using of this server, the browser sends the cookie value to the server. The server identifies this information and fulfills the request, without the user having to go through the authentication process again.

Advantages of this technology

  • Using cookies, websites can track the number of users visiting it. The site maintains the user in its database. It can implement a mechanism for counting user visits and the frequency with which a particular user visits a site, noting the user's preferences, and store this information in the website's database.
  • Some websites allow their users to change the layout and content of the site for a personalized look. Cookie technology made this possible.
  • This technology is also useful for advertisers to track user behavior. By keeping visitors' personal information private, cookies help advertisers understand visitors' web surfing habits. Advertisers may promote certain products to certain users based on the information they collect from cookies.
  • In e-commerce sites, this technology is implemented by shopping carts. When a user selects an item, it is stored in the site's database. This makes it possible to make purchases on the site. The mechanism of online shopping would be difficult without the use of cookie technology.

Disadvantages of this technology

  • Cookie poisoning is defined as the act of manipulating content in cookie before sending to the server. Changes to the information contained in cookies can be confusing to websites and advertisers. If the cookie contains transaction information, an attacker can change the value in the cookie, causing losses for the user or online store involved in the transaction. Each site has an independent set of cookies that the other site should not be able to manipulate. Cookie technology is vulnerable to this in some browsers.
  • Cookies may generate inconsistent state between the state of the client and the state of the stored cookies. In cases where an operation is canceled by clicking the back button, or when the page is reloaded, the state stored in the cookie should reflect the corresponding changes. Cookie technology lacks the ability to distinguish between two users who use the same user account. Cookies do not distinguish one user from another. They can clearly identify only the combination account user, browser, and computer.
  • Cookie technology is vulnerable to cookie theft. Cookies are theft or interception of information by an attacker. When cookies are sent unencrypted over the network over http sessions, there is a potential danger of information theft.

Modern technology has found solutions to many of these difficulties. Cookies have been criticized for the potential problems that can be encountered when using them, but they remain the simplest and one of the few ways to carry out online shopping and e-commerce activities. Despite criticism and competition, this technology is widely used to this day.

Cookies are small text files, which are created by the browser in a special folder upon command from a PHP program. Although JavaScript can also create a cookie, that's not what this article is about. Here we will only talk about setting cookies through a PHP program.

Cookies contain information in the form of name=value pairs. For example, you can record the user's login and password in a cookie and store them on the client's computer so that he does not log in again next time. Of course, storing your login and password in cookies is not the best safe way, and it is better to store this data using sessions in PHP, but this case is suitable as an example of using cookies.

PHP program instructs the client browser to set a cookie using a string in the response header. That is, you must understand how the Internet works, what a request header and a response header are, in order to understand how setting a cookie works.

So, the PHP program sends all the information about which cookies the browser should set in the response header.

Setting cookies in PHP

To set cookies in PHP language there is a setcookie() function, it sets a cookie that will be sent to the browser along with other HTTP headers.

All headers that your script produces must be sent before how your script will display something in the browser window.

Let's return to our function. Here is its syntax:

Bool setcookie (string name, string value, int lifetime, string path, string domain, bool protocol, bool http only)

bool, string, int in this syntax are data types. That is, "bool setcookie()" means that the setcookie() function returns a boolean value. Next, the first and second arguments (name and value) must be of type string, and so on.

I’ll say right away that to get started you only need the first three parameters. You can ignore the rest for now.

  • string name - name in the name=value pair
  • string value - value in the name=value pair
  • int lifetime - cookie storage time, this is the Unix timestamp, i.e. It is advisable to set this time using the time() function, adding the time in seconds after which the cookie should expire. You can also use the mktime() function.
  • string path - path to the directory on the server from which cookies will be available.
  • string domain - the domain to which cookies are available.
  • bool protocol - indicates that the cookie value should be transmitted from the client over a secure HTTPS connection. If set to TRUE, a cookie from the client will be sent to the server only if a secure connection is established. When passing a cookie from the server to the client, it is up to the web server programmer to ensure that cookies of this type are sent over a secure channel.
  • bool http only - if set to TRUE, cookies will only be accessible via the HTTP protocol. That is, cookies in this case will not be available to scripting languages ​​such as JavaScript. This feature has been proposed as an effective measure to reduce identity theft through XSS attacks (even though it is not supported by all browsers). It is worth noting, however, that around this possibility there are often disputes about its effectiveness and feasibility. The argument was added in PHP 5.2.0. Can take TRUE values or FALSE.

Only the first parameter is required. If you omit the third parameter, it will default to zero, which means that the cookies will disappear immediately after closing the browser.

Here is an example of setting cookies:

This example only sets a cookie on the client's computer.

Getting cookies in PHP

In the previous example, we sent the browser a command to create a cookie. Now it has created them, and the next time the browser sends a request to the server, it will pass the contents of the cookie in the request header.

In a PHP program, you can determine whether the browser sent a cookie or not very simply. They are available in the $_COOKIE array.

Let's complicate the previous example:

"; print_r($_COOKIE); echo "";

When you open the example page for the first time, there will be nothing behind the greeting. This is because cookies have been placed on your computer, but have not yet been sent to the server.

Although there may already be something in the $_COOKIE array, then it is not our example that places these cookies.

Only after refreshing the page a second time will you see that the PHP program received the $_COOKIE => welcome pair.

Please note that cookies are set for one minute, which means that after a minute, if you refresh the page, the greeting will be missing again.

Perhaps that’s all regarding accessing information from cookies in PHP.

Removing cookies in PHP

To delete cookies you simply need to put their expiration date in the past tense.

Please note that I have set the past tense with a reserve, in case the time is not set accurately on the client’s computer.

Example of how cookies work in PHP

Let's write a primitive counter for viewing website pages by a visitor, using cookies.

Please note that the data in this example lasts for 60 seconds, then the counter will reset to zero.

This covers the topic of working with cookies in PHP almost completely.

Almost every Windows user has encountered the concept of cookies. What they are, why they are needed and why it is advisable to clean them, read within the framework of this publication.

What are cookies

A cookie is a text file with data that is written to the browser by the server of the site you visit. These data are:

  • login and password information;
  • individual settings and user preferences;
  • visit statistics, etc.

Using this data, the site you visited will be able to identify you. This happens as follows:

  • the site server queries the browser for information in the cookie file;
  • the browser provides this information by sending a response to the server;
  • Depending on what information the site server receives, you will be identified or become a new person for the site (if the cookies are cleared).

The main parameter of a cookie is its expiration date. By default, this is one computer session. Files are deleted when the browser is closed. If they have an expiration date, they become permanent and are deleted upon expiration or by the browser cleanup function.

What are they needed for?

First of all, they are needed for the convenience of using the Internet. For example, once you log into your profile on the site, you will not need to constantly enter your login and password after closing the tab.

Also, thanks to cookies, individual account settings are saved. For example, some sites offer to add to favorites, change the design, change the interface using such files with an expiration date.

Where are cookies stored?

Files are saved in a custom folder. Each browser has its own path:

  • Opera C:\Users\Username\AppData\Local\Opera Software\Opera
  • Google Chrome C:\Users\Username\AppData\Local\Chromium
  • Yandex.Browser C:\Users\User_Name\AppData\Local\Yandex\YandexBrowser
  • Mozilla Firefox C:\Users\Username\AppData\Local\Mozilla\Firefox

Why clean?

It is advisable to clear your cookies from time to time. In addition to being useful, they can also cause some inconvenience:

  1. They provide quick access to your profiles without entering a login and password. If a stranger is at your computer, he will be able to access your personal data.
  2. In addition, if an unauthorized person ends up on your computer, you can track your browsing history using the uncleaned cookies. This is bad from a privacy perspective.
  3. If the site processes your cookie file incorrectly, you may not be able to log into your profile, or some functions on the web service will not work correctly.

How to clear cookies?

Here's an example of cleaning for popular browsers:

  1. Opera. Ctrl+H → Clear history → Cookies and other data from sites.
  2. Google Chrome. Ctrl+H → Clear history → Cookies, as well as other data from sites and plugins.
  3. Yandex browser. Ctrl+H → Clear history → Cookies and other data from sites and modules.
  4. Mozilla Firefox. Ctrl+Shift+Del → Cookies.

How to disable?

In general, the creation of cookies can be disabled in your browser. This feature is available in all popular browsers, so there shouldn't be any problems. But after turning off this function, some sites may stop working, since they interact with the user exclusively using cookies.

To disable in popular browsers:


Advice! If you see notifications in your browser: “cookies must be allowed” or “an attempt to save a cookie is blocked,” then your browser does not save cookies by default. Open settings and enable saving cookies.

Any computer user, if he does not know what cookies are, has certainly encountered the fact of their existence. This is a universal identifier by which sites recognize the user and individualize their results for him. That's why it's such a tasty morsel for scammers and businessmen.

Cookies: what are they?

Cookies are small files that are downloaded from an Internet server and stored for some time on the user's hard drive. The mechanism of formation of such elements is as follows:

  1. The user sends a request to the host computer;
  2. In response to this action, the host returns tiny files to the client PC that contain information about the current session;
  3. When you access the resource again, the procedure for communicating with the site will look simpler, since the server will “recognize” the user by the identifier saved on his machine.

This technology is the “calling card” of web browsers, although many other extensions have it in their arsenal.

The use of cookies makes surfing the World Wide Web much easier, but creates an additional threat to the user's personal data.

In this video, programmer Ilya Arapov will tell you what cookies are and why they are used in browsers:

What are browser cookies?

These elements in the computer memory store the following information about a person:

  • Usernames and passwords entered into website forms;
  • Individual settings;
  • Tracking client behavior;
  • Statistical data;
  • Information about a specific session.

All this variety of data is written to a regular text file (extension txt) and is stored in a specific location in the computer memory. Each web browser independently chooses how to save these elements, and whether they need to be saved at all.

Cookies can be roughly divided into persistent and non-persistent:

  1. Persistent files are stored on the machine's hard drive until a certain specified time. After it expires, they are automatically deleted.
  2. Non-persistent - also called session - are erased from the drive immediately after closing the program window.

The vast majority of modern browsers have a limit on the total size of cookies stored on a PC.

Benefits of cookies

Cookies have been used in various computer programs for two decades. Over such a long period of time, they have managed to establish themselves as an effective tool for solving the following problems:

  1. Saving individual settings for quite a long time. The user is spared the need to enter his login and password over and over again. As a result, time is freed up for more productive surfing the Internet;
  2. Online resources use tracking files to study customer behavior. Each site is individualized and adapted to the needs of a specific individual. This is convenient both for companies that increase conversions and for ordinary users, who can now find information much faster;
  3. Advertising becomes more targeted: when displaying an ad, the client’s request history, gender, and individual behavior are taken into account. This way, unnecessary advertising garbage is eliminated and only those products that will be truly interesting are shown;
  4. Working with some sites is basically impossible without cookies. Among them are almost all online stores.

Disadvantages of cookies

This technology, which greatly simplifies the life of the average network user, is not without a number of disadvantages. Among the most significant claims made against the browser " liver»:

  • Security failures. Information that the server sends to the client's machine for temporary storage is relatively easy to intercept. In most cases, users do not use encrypted connections to access the World Wide Web, so they become easy prey for scammers. If cookie data falls into the hands of attackers, the latter can learn a lot about website visits and a person’s online behavior;
  • The meaning of their existence is reduced to almost nothing if several browsers are used in parallel. Each of them stores its own temporary files, which do not intersect with each other;
  • A significant part of users are convinced that cookies are program files that can arbitrarily delete information from a PC storage device. Some claim that they are purely for advertising or spam. All these concerns are nothing more than delusions.

Precautions when surfing the web

“Holes” in the software allow you to obtain detailed information about a person. Moreover, the recipient of such data can be both criminals and unscrupulous businessmen, and caring government agencies.

To avoid surveillance and theft of confidential information, you can configure your browser to:

  • Cookies were never written;
  • Tracking files were automatically deleted after closing the Internet browser;
  • Prevent sending data from your computer to the servers of some suspicious sites;
  • Set a short period of time for storing tracking information.

Periodically you need to force clean your browser. However, to delete the contents of folders, you need to know where they are. To help novice users, special programs have been developed (for example, CCleaner) that analyze and delete cookies at the click of a button.

What are cookies and cache?

In order to facilitate Internet surfing, the computer stores not only metric and statistical data. The browser downloads the following information from the network from the most recently visited pages:

  1. Images;
  2. Sound files;
  3. Videos;
  4. Copies of html pages.

The entire set of data listed above is designed to speed up the loading of resources and simplify interaction with the network space. Thus, loading videos into the cache is very convenient for those who have problems with the Internet connection.

However, loading not from the web, but from a PC can lead to the fact that the “picture” on the screen will be irrelevant. In addition, the cache folder takes up a lot of space since all its contents are media files.

So, in this article we explained what cookies are. Thanks to them, you can only fill out the password form on the site once and do not have to remember it every time you log in. It is thanks to them that the user sees only those advertisements that he needs. But such simplicity comes at the price of security and safety of personal data.

Video: how to free up space and delete cookies?

In this video, master Anton Prokhorov will tell you how to clear the cache and cookies in the Google Chrome browser: