Chapter 16. Cookies


16.1 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 ...

Get JavaScript by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.