Frontend System Design
/Intermediate
Cookie Security
Definition
Cookies can be secured via flags: `HttpOnly` (prevents `document.cookie` access via JS), `Secure` (forces HTTPS transmission), and `SameSite` (prevents cross-origin sending to mitigate CSRF).
Explain Like I'm New
Adding security locks to your cookies so hackers can't read them via scripts or hijack them during cross-site requests.
Interview Questions
basic
- What is the core concept of Cookie Security?
- What are the pros and cons of Cookie Security?
intermediate
- How does Cookie Security impact SEO and initial page load times?
- When would you NOT choose to use Cookie Security?
advanced
- How does Cookie Security fit into a heavily scaled microservices architecture?
- What are the security implications of Cookie Security?
trick
- Can you combine Cookie Security with other rendering strategies on the same page?