# JavaScript Level 15: Performance & Security

> Level 15: Performance & Security of the LoWisa JavaScript course: Performance Profiling, Common JavaScript Security Risks, Reliable Production Patterns. 3 lessons and 9 ideas, each explained in one line.

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

## 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

- **Before:** [Level 14: Testing & Code Quality](/courses/javascript/level-14-testing-and-code-quality/): Unit and Integration Testing, Static Analysis and Linting, Designing Testable JavaScript.
- **Next:** [Level 16: JavaScript Mastery](/courses/javascript/level-16-javascript-mastery/): Advanced Runtime Behaviour, Architecture and Language Trade-Offs, Reading and Improving Complex JavaScript.

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](/help/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.

---

Source: https://lowisa.dev/courses/javascript/level-15-performance-and-security/ · Updated 2026-11-16
