Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
About the Author
About the Reviewers


HTTP, the foundation of the web as we know it, is stateless. This means that every request is independent of any previous request. In the world of HTTP, each request has a matching response. We see independent requests everywhere in HTTP; requesting a static resource, a web page, or an AJAX request are all examples of the stateless protocol in action.

That being said, we still require the ability to track users across requests. Without some type of unique tracking of the person or system sending the request, we wouldn't be able to have authenticated-only pages, partition user data, or a zillion other things. Sessions allow us to track information about the sender between each request.

In our hipstr app, this is tied together by a cookie called, ring-session. You can view the cookie by navigating to the hipstr app on your machine (http://localhost:3000, by default). You can then open the development tools in your browser and, typically, view the resources for the page. Typically, there...