-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Service Worker: try to access to a static file always refer to 'index.html'? #3975
Comments
cc @jeffposnick |
This is a duplicate of
and others. It's the expected behavior "as of right now", and there's background info in those bugs and in the docs. Given the developer confusion, we were initially going to address this by keeping the service worker registered, but removing that specific behavior of "falling back" to But, the decision was made to disable service worker registration by default in the |
This caused me to spend 2 hours digging through nginx config, which was quite the learning experience but also absolutely infuriating. |
@spawnia can you share your learnings? I'm afraid I'm in the same boat. what is to be done? |
I put my static files in the public folder and i switched to |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. |
Is this a bug report?
Maybe yes
I put a image file in /public/ as /public/images/share.png, and in production, when I try to access this image in browser (by putting in address in address bar) with 'https://mydomain/images/share.png', the browser always open the main page (/public/index.html).
And I update my Chrome to latest version, nothing changed.
And when I access 'https://mydomain/images/share.png', and press crtl+shift+R, it works normally, but if I use the refresh button or press ctrl + R, it open /public/index.html again
After unregistering the service worker, everything works fine.
Is this how service worker works ?
The text was updated successfully, but these errors were encountered: