tailieunhanh - Học JavaScript qua ví dụ part 79

Cookies là gì? Các giao thức web, HTTP, được thiết kế để được quốc tịch để giữ cho giao dịch giữa một tóm tắt trình duyệt và máy chủ và cắt giảm các chi phí của việc giữ kết nối mở. Không quốc tịch có nghĩa là sau khi giao dịch diễn ra giữa các trình duyệt và máy chủ, kết nối bị mất và không phải trình duyệt máy chủ cũng không có bất kỳ sự hồi tưởng về những gì transpired giữa một phiên và tiếp theo | chapter 16 Cookies What Are Cookies The Web protocol HTTP was designed to be stateless to keep transactions between a browser and server brief and cut down on the overhead of keeping connections open. Stateless means that after a transaction takes place between the browser and server the connection is lost and neither the browser nor server have any recollection of what transpired between one session and the next. But as the Internet grew and people started filling up shopping carts with all kinds of goodies ordering everything from groceries to music books prescription drugs and even cars and homes it became necessary for merchants to remember what their customers purchased their preferences registration numbers user IDs and so on. Enter Netscape way back in 1994 with the cookie. A cookie is a local file used to store information and it is persistent that is it is maintained between browser sessions and remains even when the user shuts down his or her computer. The cookie idea became very popular and is now supported by all major browsers. The term cookie comes from an old programming trick for debugging and testing routines in a program. A text file called a magic cookie was created. It contained text that was shared by two routines so that they could communicate with each other. The cookie feature started by Netscape1 is also just a little piece of textual data that is stored in a file often called the cookie jar on the hard drive of the client browser . It contains information about the viewer as he or she navigates different pages on a Web site or returns to the Web site at a later time. The information might be as simple as to welcome the viewer to your site and based on past visits show him or her a new book by a favorite author display the latest stock quotes or take the user to CNN Europe when he or she wants to view the news. It could save billing and shipping information to be retrieved at a later time to save retyping it over again. There are two .

TỪ KHÓA LIÊN QUAN