Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Disable serviceworker subdirectory #24

Open
HRR1337 opened this issue Jun 5, 2018 · 1 comment
Open

Disable serviceworker subdirectory #24

HRR1337 opened this issue Jun 5, 2018 · 1 comment

Comments

@HRR1337
Copy link

HRR1337 commented Jun 5, 2018

Hi there,

We have an self-made system created in a subdirectory of our site. The issue is, its not refreshing correctly when we enable pwa. So we added the url to the "Offline URL Blacklist". Only its not working. Is that beceause its an subdirectory?

Thanks!

@tgerulaitis
Copy link
Member

Hi @HRR1337,

The system being in a subdirectory shouldn't affect anything. The service worker simply uses the URL path to decide whether the HTML request gets cached or not. One thing to keep in mind is that the blacklist only affects HTML requests. If your system relies on its JavaScript or other assets being fetched fresh from the server, you'd have to modify the serviceworker.js file to exclude those.

Cheers,
Tomas

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants