-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback .html extension matters to fallback setup? #2773
Comments
This all depends on the setup of your web server. Based on what you describe, it sounds like your web server returns a valid HTML document when This is mostly beyond the scope of what we have control over in the Workbox project, though. |
Thank you so much for answering, looks like I'll have to explore more to understand the mechanism of file hosting. |
I've done multiple experiments with my Jekyll+Webpack+WEBrick setup, looks like the service worker was able to cache all of but only So the web server seems to be doing the job sending the server copies of offline page, but the service worker was not able to serve the offline page when When I try to access |
I see from #903 (comment) that workbox handle |
Oh, so looking more closely, the issue is that your response was the result of a redirect, and there's a service worker security restriction that prevents redirected responses from being used to fulfill navigation requests. I'm assuming
|
That fully dspell my doubts, thanks a lot for your kind explanation! |
I'm following the google developer guide to build a PWA with a fallback page.
my SW:
But the fallback page always respond with ERR_INTERNET_CONNECTION.
After changing
/404
to/404.html
and serving the page with the extension, the issue was gone.Out of curiosity, I would like to know why URL without extension would not work as a fallback path. Any insights?
PS. Sorry if it's a bad place to ask questions...
The text was updated successfully, but these errors were encountered: