Cookies and their applications in PHP

Source: Internet
Author: User
Cookie is a very controversial technique. since its birth, it has become a focal point of debate between large network users and Web developers. Some network users, even some senior Web experts, are also dissatisfied with its generation and promotion. this is not a Cookie technique, which is a very controversial technique, since its birth, it has become a focal point of debate between large network users and Web developers. Some network users, even some senior Web experts, are also dissatisfied with its generation and promotion. this is not due to the weak effect of Cookie techniques or the performance of other skills, it is only because they feel that the application of cookies constitutes a threat to the privacy of network users. Because the Cookie is a small text file retained by the Web server in the user's browser, it contains information about the user (such as the ID code and password, the user's method of shopping on the Web site, or the number of times the user visits the site ).

So what are Cookie skills after all? Is it true that it has brought personal privacy persecution to network users? Let's take a look at the following content and try again.

(1) Cookie tips

In the development history of WEB skills, the presentation of Cookie skills is a major change. First, Netscape introduced Cookie techniques in its Netscape Navigator browser. Since then, the World Wide Web Association began to support Cookie standards. In the future, it has been vigorously promoted by Microsoft (because Microsoft's IIS Web server adopts ASP skills to a large extent and applies Cookie skills ), that is, the Cookie technique is fully supported in Microsoft Internet Explorer. Up to now, most browsers support Cookie skills or applications that are at least compatible with Cookie skills.

1) What is Cookie?

According to the definition in Netscape official documentation, Cookie is a method in which the server or script can protect the information on the customer's workstation under the HTTP protocol. A Cookie is a small text file retained by the Web server in the user's browser, it can contain information about the user (such as the ID code, password, the user's method of shopping on the Web site or the number of times the user visits the site ). The Web site can visit Cookie information whenever a user links to the server.

In general, the browser uses one or more restricted files to support cookies. These files are called Cookie files on the machine where the Windows operating system is applied, and the magic Cookie files on the Macintosh machine are used by websites to store Cookie data.

Websites can insert information into these Cookie files, which has some side effects on some network users. Some users think that this has resulted in a violation of personal privacy. What's worse, some users think that cookies are a violation of personal space and will bring security persecution to users' computers.

Currently, some cookies are temporary, while others are continuous. Temporary cookies are only retained for a specified period of time in the browser. Once the specified period expires, the Cookie will be cleared by the system. For example, in PHP, cookies are used to track user processes until the user leaves the website. A persistent Cookie is stored in the user's Cookie file, and can still be called when the next user returns.

Keep the Cookie in the Cookie file, and some users will think that this will bring a lot of titles. It is important that some users worry that cookies will track users' online surfing habits, such as those types of websites that users like and what kind of sports they love. Fear that once such personal information is put into the hands of some dedicated guys, then the individual may become a lot of spam objects, or even be accidentally attacked. However, there is no such worry because users outside the website cannot cross the website to obtain Cookie information. Therefore, it is impossible to use cookies with such goals. However, some browser developers have no choice due to the incorrect understanding of some users and "rumor-breaking, I had to make a acquaintance response (for example, Netscape Navigator4.0 and Internet assumer3.0 both provide the option to block cookies ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.