-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Simple refresh page when sw detects offline #8765
Comments
I think it might also be nice to show the reason why the service worker thinks you are offline. Because currently any fetch error will cause the service worker to think you are offline. Noticed this when I did not renew my TLS certificate on time and got the "Offline" screen. |
fetchは、サーバーが4xxや5xxを応答した時はresolveになります。fetchがreject(error)になるのは、(主としてユーザーの)回線に問題があるときです。これはofflineと言っていい状況です。 |
@ThatOneCalculator dunno if i understand you correctly, but you actually can already set a warning page like you suggested: |
That warning will only be shown when the web client detects that the server goes offline while you are already using the client. The service worker error shown above would be shown when the server is already offline when you navigate to the website and the service worker is already cached in your browser. |
Summary
Right now, when Misskey's offline, it just shows a single line message:
misskey/packages/sw/src/sw.ts
Line 29 in ebc2566
If there's a way it could instead respond with a basic page like this, it'd be a lot more user friendly:
The text was updated successfully, but these errors were encountered: