Lesson overview · Free interview practice
Browser Security
Defend the browser runtime: XSS vectors, CSP, and safe client-side storage.
Topics in the full lesson
- Introduction to Web Security
- Cross-Site Scripting (XSS)
- Cross-Site Request Forgery (CSRF)
- Content Security Policy (CSP)
- Other Security Best Practices
- Exercises
Practice Problems
Work through a question before revealing its explanation. These questions and answers are free; Premium adds the full lesson walkthrough, examples and implementation detail.
Completion marks record your own progress, not an automatically checked result. The task type does not determine whether it is optional.
TheoryEasy
Cross-Site Scripting (XSS): Vectors and Defenses
TheoryMedium
Cross-Site Request Forgery (CSRF): The Attack and the Token Defense
TheoryMedium
Avoiding `eval` and `innerHTML`: Safe Alternatives
TheoryMedium
Content Security Policy (CSP): The XSS Backstop
Explore the full Browser Security material
Premium includes the complete lessons and implementation references. Free practice questions remain available without a subscription.
All course tracks & premium content
From basics to advanced masterclasses
Built for JS/TS developers like you
Real-world tips & common pitfalls