Can a service worker read cookies or the DOM?
A service worker has no direct DOM access and cannot touch document.cookie, since it runs off the main thread. However, it can intercept network requests within its scope and inspect or modify their headers and bodies, which gives it substantial influence over the data flowing to and from the page.