JavaScript course

JavaScript Level 15: Performance & Security

Performance & Security is level 15 of 16 of the LoWisa JavaScript course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-16

Performance Profiling

  • Measure first. A profiler shows where time actually goes: optimising before measuring polishes code that was never the problem.
  • Hot paths. The flame graph’s widest frames are the hot path; a small win there beats a big win anywhere else.
  • Micro versus macro. Users feel macro costs: network waits, layout thrash, long tasks: long before any clever loop trick matters.

Common JavaScript Security Risks

  • XSS. Cross-site scripting: XSS: is user text reaching innerHTML unescaped, letting attackers run script as your page.
  • Injection. Any string you concatenate into a command, query or HTML is an injection door; parameterised APIs close it.
  • Secrets in clients. Anything shipped to the browser is public: API keys belong on a server the client asks politely.

Reliable Production Patterns

  • Graceful degradation. Production code plans for failure: a fallback answer, a retry with backoff, an honest error the user can act on.
  • Idempotency. An idempotent operation lands the same result when repeated: the property that makes retries safe.
  • Observability. Logging the inputs and decisions on real failures turns tomorrow’s mystery bug into a five-minute read.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does JavaScript Level 15: Performance & Security cover?

Performance Profiling, Common JavaScript Security Risks, Reliable Production Patterns: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 14: Testing & Code Quality, which covers Unit and Integration Testing, Static Analysis and Linting, Designing Testable JavaScript.

Learn JavaScript on your phone

The first level is free. LoWisa is on Google Play and the App Store.