Lesson 9.2

Serializing a Set-Cookie line

The anatomy of one Set-Cookie value - the encoded pair, value-bearing attributes versus bare flags, the frozen emission order, and the SameSite=None security guard.

30 minsrc/cookies.js
  • Serialize one cookie as name=value plus attributes in the frozen order.
  • Distinguish value-bearing attributes from bare flags and emit each correctly.
  • Enforce the SameSite=None requires Secure rule by throwing at the source.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth