9. JavaScript and Cookies

In web terms, a cookie is a unique nugget of information that a web server gives to your browser when the two first meet and which they then share with each return visit. Your browser saves the cookie—and the information it contains about you—as a plain text file stored on your computer’s drive.

As a JavaScript coder, you can do many useful things with cookies. If your site requires registration, you can set cookies to store your readers’ user names and passwords on their drives so that they don’t need to enter them every time they visit. ...

Get Visual QuickStart Guide: JavaScript, Ninth Edition 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.