Browser & Web Performance · Senior · Question 70 of 75
What does a service worker mean for XSS impact?
- 1Service workers can only cache images, so there's no impact
- ✓Correct answer: An XSS that registers a malicious service worker can persist and intercept requests on later visits
- 3Service workers make XSS impossible
Explanation
Restrict the SW script path, avoid registering workers from user-controlled URLs and keep Clear-Site-Data ready for incident response.