Closed
Description
Consider a site a.com
which has a stylesheet link to a.com/foo.css
. But a.com/foo.css
redirects to a.com/style/foo.css
. Inside foo.css there is a relative background-image url to ./bg.jpg
.
With no service worker in play, the site will end up loading a.com/style/bg.jpg
.
If there is a passthrough service worker that does nothing but e.respondWith(fetch(e.request));
then the site will try to load a.com/bg.jpg
. This is because the redirect to a.com/style/foo.css
is eaten by the SW fetch() call.
Should FetchEvent.request for stylesheet loads have RequestRedirect set to "manual"? This would ensure that the stylesheet always sees the final URL and properly loads the correct relative sub-resources.
Metadata
Metadata
Assignees
Labels
No labels