mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-24 04:54:51 -04:00
parent
c693362c8a
commit
b8043d9832
@ -15,6 +15,11 @@ It uses ZIM files that you can download from http://download.kiwix.org/
|
||||
You have to download them separately, store them in your filesystem, and manually select them after starting the application.
|
||||
It is unfortunately not technically possible to "remember" the selected ZIM file and open it automatically (the browsers refuse that for security reasons).
|
||||
|
||||
Technically, after reading an article from a ZIM file, there is a need to "inject" the dependencies (images, css etc). For compatibility reasons, there are several ways to do it :
|
||||
- the "jQuery" mode parses the DOM to find the HTML tags of these dependencies, and modifies them to put the Base64 content in it. It is compatible with any browser, but is slow and can use a lot of memory. It works well on wikimedia content, but can miss some dependencies on some contents
|
||||
- the "ServiceWorker" mode uses a Service Worker to catch any HTTP request the page would send, and reply with content read from the ZIM file. It is a generic and much cleaner way than jQuery mode, but it does not work on all browsers. And ServiceWorkers are disabled by Mozilla in Firefox extensions
|
||||
- maybe a "webRequest" mode will appear, which would use the webRequest API inside the Firefox extension (when the necessary APIs will be implemented by Mozilla)
|
||||
|
||||
This application is released under the GPL v3 license. See http://www.gnu.org/licenses/ or the included LICENSE-GPLv3.txt file
|
||||
The source code can be found at https://github.com/kiwix/kiwix-html5
|
||||
Unit tests can be run by opening tests.html file on Firefox.
|
||||
|
Loading…
x
Reference in New Issue
Block a user