What are Internet Cookies?

Cookies are sometimes used in the plural. The type is " small text file ", which is the data (usually encrypted) stored on the user's local terminal by some websites in order to identify the user and conduct session tracking. The information is temporarily or permanently saved by the user's client computer [1] .

Cookie is not its original meaning of "cookie", but a simple text file stored in the client, this file is related to a specific
Cookies are small pieces of no more than 4KB
In Web authentication, because of the limitations of the HTTP protocol itself, other technologies must be used to continuously transmit the relevant authentication mark in some way to prevent customers from re-entering authentication information when jumping from one page to another [5]
Because cookies are text files or data stored in the hard disk of the user's computer transmitted by the website we browse, the location where they are stored on the hard disk is closely related to the operating system and browser used. On a Windows 9X system computer, the cookie file is stored in C: \ Windows \ Cookies. On a Windows NT / 2000 / XP computer, the cookie file is stored in C: \ Documentsand Settings \ username \ Cookies. The cookies file on the hard disk can be read by the web browser, and its command format is: username @ website [] .txt. It should be noted that the cookies on the hard disk are text files, not programs [6] .

cookie settings

You can view all cookies saved to your computer by selecting "Settings / View Files" in the "General" tab of "Tools / Internet Options" in Internet Explorer. These files are usually named in the form user @ domain, where user is the local user name, and domain is the domain name of the website you are visiting. If you use NetsCape browser, it is stored in "C: \ PROGRAMFILES \ NETSCAPE \ USERS \". Unlike IE, NETSCAPE uses a cookie file to record all website cookies. The cookie can be set appropriately: Open the "Privacy" tab in "Tools / Internet Options" (note that this setting only exists in IE6.0, other versions of IE can click "Tools / Internet Options" | "Security" tab "Custom Level" button for simple adjustments) to adjust the security level of cookies. Normally, it can be adjusted to the "medium high" or "high" position. Most forum sites need to use cookie information. If you never go to these places, you can set the security level to "Block All Cookies"; if you just want to ban cookies for individual websites, you can click the "Edit" button to add the sites to be blocked To the list. In the "Advanced" button option, you can set the first-party cookie and the third-party cookie. The first-party cookie is the cookie of the website being viewed, and the third-party cookie is the cookie sent by the non-surfing website. Three-party cookies choose "Reject". If you need to save cookies, you can use IE's "Import and Export" function, open "File / Import and Export", and follow the prompts [6] .

cookie writing and reading

The Cookies collection is a collection of data attached to the Response object and the Request object. You need to add a Response or Request in front of it when using it. The syntax used to send cookies to clients is usually:
  <% Response.cookies ("Cookies name") = data%>
When a non-existing cookie set is set, it will be created on the client. If the cookie already exists, it will be replaced. Because cookies are sent to the client as part of the HTTP header information, the code for sending cookies to the client is usually placed before the tags of the HTML file sent to the browser. If the user wants to read cookies, he must use the Cookies collection of the Request object, which is used by:
  <% efg = request.cookies (abc) (assigns the value of the cookie object abc to efg)%>
It should be noted that, before the server has not downloaded any data to the browser, the browser can exchange cookies with the server for data collection. Once the browser starts receiving the data downloaded by the server, the data exchange of cookies is stopped. In order to avoid Error, add response.Buffer = True [6] to the program and before it.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?