Advanced level · Module 5 of 6 · 22 guided hours
Performance, Security and Accessibility in JavaScript
Measure and improve performance on low-end devices, protect users from cross-site scripting and other attacks, and make dynamic interfaces accessible.
Learning objectives
- Measure and improve loading and runtime performance
- Prevent cross-site scripting and handle untrusted data safely
- Make dynamic interfaces accessible to keyboard and screen-reader users
Topics
- Lighthouse and the Performance panel
- bundle size and code splitting
- debounce and avoiding layout thrashing
- XSS and safe rendering
- Content Security Policy
- focus management and ARIA live regions
Lessons
-
Lesson 1 Measuring and Improving Performance
Measure loading and runtime performance with Lighthouse and the Performance panel, and reduce JavaScript cost.
Core Web VitalsLighthousebundle sizemain-thread blocking
-
Lesson 2 Responsive Interactions
Keep interfaces responsive by debouncing input, avoiding layout thrashing and splitting long tasks.
debounce and throttlelayout thrashingrequestAnimationFramebreaking up long tasks
-
Lesson 3 Security: XSS and Untrusted Data
Prevent cross-site scripting, handle untrusted data safely and add a Content Security Policy as a second line of defence.
cross-site scripting (XSS)textContent vs innerHTMLContent Security Policyuntrusted input
-
Lesson 4 Accessible Dynamic Interfaces
Make interfaces that change without reloading usable with a keyboard and screen readers.
semantic HTMLkeyboard accessfocus managementaria-live
Practical activity
Audit the visit tracker for performance, security and accessibility, fix the top issues in each area and document before-and-after measurements.
Expected outcomes
- Fast apps on low-end phones and slow networks
- Safe handling of untrusted data
- Accessible dynamic interfaces
Assessment
Audit report with evidence (Lighthouse scores, profiler screenshots, keyboard test results) and the fixes made.
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.