Browser internals·Intermediate·Conceptual·1 min read
What makes a cookie automatically sent with a request?
Short interview answer
Its Domain and Path attributes match the request URL, it hasn't expired, and its Secure/SameSite attributes permit sending it in that request's context — the browser attaches matching cookies without any JavaScript involvement.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.