-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Enable support for service workers for new replay system #487
Comments
@mgautierfr I have tried the simple proposal of @ikreymer but the rendering still fails. Your help is needed. It is important we secure this can work with Kiwix Desktop for Zimit. |
i've spent a bit more time trying to get service workers to work in kiwix-desktop. First, would definitely need a later Qt, as per kiwix/kiwix-build#403 as the chromium that ships with default ubuntu bionic packages (5.9) is far too old. Unfortunately, no matter which flags I tried, service workers did not work with the custom But, fortunately, service workers do work when running from localhost in QtWebView, so probably the solution that will work is to run kiwix-serve inside kiwix-desktop and load the zim data via http that way, instead of via the custom protocol handler. It should look the same/make no difference to the user, but I imagine will require some changes here, to load from Here's an example of the replay within kiwix-desktop with a manually hacked localhost server: |
@ikreymer Thank you very much for this testing. Your are 100% sure there is nothing in your code or JS code you rely one where the protocol |
Yes, there's nothing specific to http. It runs on https too of course. The system requires fetch and service worker support, though. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
FWIW, Electron finally fixed support for service workers with custom protocols, so perhaps this may be more feasible as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
For people interested in a workaround for sole usage on local computer:
|
For people interested by this ticket, this is meanwhile on the very top of priority list, so should be fixed in the few next months. |
It seems that we will be able to create ZIM files without SW with Zimit in version 2.0. Therefore this feature request priority is significantly lowered. |
Glad to see this is an active thread. I am tinkering with Kiwix and I just tried making an offline website but I ran into this message when trying to access the site via a kiwix server: Try Loading HTTPS URL?" ❣️ Thank you devs you make me happy. ❣️ |
@crowlsyong The only workaround for the moment for you is to start the http server on the 127.0.0.1 and you shoukd be able to see your ZIM content. |
Closing this ussue as Zimit2 does not rely on SW. |
Since kiwix-desktop use a custom scheme, to enable support for the service-worker based replay, the following flag should be enabled:
https://doc.qt.io/qt-5/qwebengineurlscheme.html
Hopefully this will make it work, though there is a chance that it may not, and regular
http://localhost
server may be needed..Here is an example ZIM file that works with kiwix-serve in the browser, and will hopefully work with service workers enabled
zimreplay.zim (rename .zip -> .zim as github doesn't allow .zim attachments)
Here's how it looks like with kiwix serve (replay of a twitter.com/netpreserve using a baked in warc file from: https://github.com/webrecorder/replayweb.page/blob/master/examples/netpreserve-twitter.warc)
The text was updated successfully, but these errors were encountered: