This article focuses on the general principles of "software" and "service. From "How to Protect Privacy: How does a browser cause privacy leakage", we have learned several reasons for the browser's privacy leakage. How can we protect privacy? This article will begin with the prevention of browser cookies to help you strengthen privacy protection.
★What is "cookie "?
The "cookie" mentioned in this Article refers to the browser-related cookie, also known as "HTTP cookie ").
The main function of the browser cookie is to help the website Save the information of some small fragments. For example, you have logged on to a forum in your browser. Next time you open the login page of the forum, you will find that the user name has been filled in for you. You only need to enter the password. How does one know the account name you used for the last logon On This logon page? The secret lies in that the website saves a cookie on your browser, which contains the name of the account you used for the last login.
★Cookie technology implementation
This topic is intended for technical users. Readers who do not know much about the technology can skip this section and enter the next section to avoid wasting time.
◇ How to set cookie write operations for websites)
1. When you click a bookmarks in the browser or enter a website address in the address bar of the browser, the browser initiates an HTTP Request to the corresponding website ).
2. After the website server receives the HTTP request, it will send the corresponding content such as webpages, images, and so on back to the browser. This is called HTTP response, which is called HTTP Reponse ).
If a website wants to set a cookie, it contains an instruction to set the cookie in the returned HTTPResponse. Example:
In the preceding example, a cookie is set. The "name" of this cookie is user; the "value" of the cookie is xxxx; the domain name bound to the cookie is www.example.com
3. After receiving this command, the browser will store the cookie information on your computer.
◇ How does the website obtain the cookie read operation)
Assume that after a few days, you have set the cookie in the last visit to www.example.com ). At this time, the browser finds that the website has a corresponding cookie, it will put the cookie information in the HTTP Request, and then sent to the website server. The specific commands are as follows:
After the website server obtains the HTTPRequest, it can use the above information to know the "name" and "value" of the cookie ".