Chapter 7. Cookies
JavaScript is a purely client-side technology. Admittedly, it is possible to use JavaScript on the server, but this has nothing to do with JavaScript running in the browser; it is a similar syntax in a completely different context.
Usually, JavaScript is completely restricted to the current page and does not have access to something from the server. There are very few exceptions to this rule. One exception can be found in Chapter 11, “AJAX (and Related Topics),” and another one is covered in this chapter.
Cookies are not a specific browser technology, but a mechanism in the client/server model to overcome one major shortcoming in the HTTP protocol. HTTP is stateless, which means that the protocol does not have a memory. A client ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access