{"size": 550, "ext": "scrbl", "max_stars_repo_path": "scribblings/fourth.scrbl", "max_stars_repo_name": "bennn/racketcon-2018-web-devel-workshop", "max_stars_repo_stars_event_min_datetime": "2018-09-30T16:11:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T23:21:43.000Z", "max_issues_repo_path": "scribblings/fourth.scrbl", "max_issues_repo_name": "bennn/racketcon-2018-web-devel-workshop", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scribblings/fourth.scrbl", "max_forks_repo_name": "bennn/racketcon-2018-web-devel-workshop", "max_forks_repo_forks_event_min_datetime": "2022-03-17T23:21:52.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-17T23:21:52.000Z"}
{"max_stars_count": 8, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 68.75, "max_line_length": 369, "alphanum_fraction": 0.7836363636}
#lang scribble/manual

@title{Fourth Tutorial—Can I have a cookie?}

Wherein we build a web server that has state in the form of cookies to implement a very basic theme switcher.

We start to use cookies now, an omnipresent technique for recognizability in HTTP (whereby the server can recognize that the request it's currently processing belongs to a known `user` or `session'. We also look at X-exprs, an alternative to @tt{include-template} for generating HTML. (We'll use Matthew Butterick's @tt{txexpr} library to help us generate the X-exprs.)
