# Kiwix JS PWA
Offline Wikipedia reader

## Welcome to Kiwix JS for Windows

#### Version 1.0 (changes)

### Please read this important information

DISCLAIMER: Please be aware that Kiwix works with offline archives. To get updated info, you will need to download a new archive periodically. Information in archives is free, open source and provided by volunteers.
Kiwix gives no guarantee as to the accuracy of information in the archives you access with this app.

This application (apart from the PWA version) is packaged with only a sample ZIM archive of the top 100 Wikipedia articles so that you can get a feel for how offline Wikipedia browsing works. You will need to downloaded an offline ZIM archive and store it on your device. You can do this from the Configuration page , or else see the About page for more information.

For the full experience you must download a ZIM archive and store it on your device! Alternatively, if you only want Wikivoyage or WikiMed in English, look for "Wikivoyage by Kiwix" or "WikiMed" in the Store and install those apps instead.

Kiwix JS is free and open source. If you like it, please leave a positive review. Constructive feedback and help with improving the app are very welcome: see About section.

### Changes in version 1.0

- Minor update to improve handover between local and PWA code
- Further implementation of Service Worker mode in UWP app (PC, not mobile)
- Fix display of masonry tiles in JQuery mode with latest ZIMs

Full changelog...

### Features in Version 1.0

- Compatible with Continuum!
- Printing the article contents is supported on mobile and desktop
- Front page (of ZIM) cached for faster return to home page
- Wikivoyage pages (English and German) display map location markers: tap to open Maps app
- Last-visited page remembered between sessions (optional)
- In-page search / highlighting (search button/Ctrl-F/Alt-F)
- Dark-theme for UI and content
- Equations typeset with KaTeX if original TeX string is available
- Transform layout: Wikipedia mobile or desktop styles
- Optionally disable images if device is slow
- Export page to view in browser (using breakout link)

### Please choose print options

Print the desktop (not mobile) style (default: yes) Print navigation boxes (default: no) Print endnotes (default: no) Print External Links / Further Reading (default: no) Print See Also (default: no) Print infoboxes (default: yes) Print images (default: yes) Resize document for printing: Current value: 75%

#### Information

## Kiwix JS Windows

### Offline Wikipedia Viewer (Version )

Packaged ZIM archive:

- Adding archives and languages
- Changelog and Features
- Expert or Experimental Settings
- Privacy Policy
- Feedback and Support
- Credits and Licence
- Official site : https://www.kiwix.org/

DISCLAIMER: Please be aware that Kiwix works with offline archives. To get updated info, you will need to download a new archive periodically. Information in archives is free, open source and provided by volunteers.
Kiwix gives no guarantee as to the accuracy of information in the archives you access with this app.

If your Internet access is expensive, slow, unreliable, insecure or censored, you can still gain offline access to a huge repository of knowledge and culture.

To use this app, you will need to download one or more archives (called ZIM archives) from the Kiwix website. You will then have offline access to Wikipedia, Wiktionary, Wikivoyage and many other sources even if you are undertaking a long plane journey, hiking, and travelling or living in areas with weak Internet access.

You can search through article titles and read any of these articles completely offline.

You can have the entire content of Wiktionary or Wikipedia in your language (including the images) in your pocket.

Offline archives use the OpenZIM format, but note that this app has been only tested extensively on Wikipedia-related archives (e.g., Wikipedia, Wikivoyage, Wikimed, Wiktionary).

On some Wikivoyage (English and German) pages you will see a map location marker: . Tap this icon to open the Maps app at the selected location. In the UWP version of this app, this will work offline if you have downloaded the map for the relevant country in the Settings for Offline Maps.

### Usage

#### Step 1: download some content

You can browse the Kiwix repository on the Configuration page, and it will provide instructions according to the type of file you download. Alternatively, visit https://download.kiwix.org/zim/ using a regular computer. Currently only Wikimedia contents (ZIM files in wiki* subdirectories) and Stackexchange have been tested fully. There are known bugs when reading some other content, and dynamic content is not supported in jQuery mode. You may need to switch the app to the experimental PWA/ServiceWorker mode (see Expert Settings in configuration) to access dynamic content.

If you have enough space, you can put several archives on your device storage. If you download the content directly in the app, note the location of the saved file when you get the notification that it has completed. If you downloaded via a PC, you will generally need to use a USB cable to copy the ZIM archive(s) to an accessible location on your device, such as the SD card or the main storage area if there is enough space there.

#### Step 2: copy the content onto your device

If you have enough space, you can put several archives on your device storage. If you download the content directly in the app, note the location of the saved file when you get the notification that it has completed. If you downloaded via a PC, you will generally need to use a USB cable to copy the ZIM archive(s) to an accessible location on your device, such as the SD card or the main storage area if there is enough space there.

#### Step 3: go to the "Configure" menu and select your ZIM file (or double-click / drag-and-drop your file into the app)

On the Configuration page, tap the "Select storage" button. If you have downloaded more than one archive, or you have a split ZIM archive consisting of several 2GB files, then you will need to pick the folder that contains these files or else (in older browsers) you will need to select all the split parts. If you have just one unsplit ZIM archive, you can instead pick the file directly, using the respective buttons on the Configuration page (note that these buttons only appear after you tap "Select Storage"). In most modern contexts the archive will be remembered on next launch (Firefox and IE11 are exceptions).

Alternatively, in the UWP app you can simply double-click the ZIM file to launch it in the app, even if the app is closed (your choice will be remembered on next launch). You can also drag-and-drop your ZIM file into the app, but it may not be remembered on next launch in all contexts (try it if this method interests you!).

#### Step 4: enjoy your content offline!

### Changes in 0.9

### Privacy policy

When installed, Kiwix JS Windows works offline, and does not collect or record any of your personal data. It only remembers your browsing history for the duration of a session (for the purpose of returning to previously viewed pages). This history is lost on exiting the app with the optional exception of the last-visited page.

If you access this app from a secure web server (e.g. the PWA server), it will only work offline if your browser is capable of installing a Service Worker. If you install or bookmark the PWA version, then it will work offline, but note that by design any PWA will periodically check the PWA server (in this case, https://pwa.kiwix.org/), if it is available, to check for an updated Service Worker.

By default, this application will remember your last-visited page for each ZIM between sessions using local storage or a cookie that is accessible only by this app on this device. If you are accessing sensitive information that you do not wish to be displayed next time you open this app, we recommend that you turn this option off in the Configuration options.

This application only reads the archive files that you explicitly select on your device and files included in its own package: it is not capable of reading any other files. It will only access the Kiwix download server if you specifically request it to access the download library for ZIM archives on the Configuration page. If you run the app as a PWA, it will cache its own code from the secure PWA server and then can be used offline. Some ZIM archives contain active content (scripts) which may, in rare circumstances, attempt to contact external servers for incidental files such as fonts. These scripts will only run if you enable Service Worker mode in Configuration.

If you believe your Internet access is insecure, or is being observed or censored, we recommend that you completely shut down your Internet access (Data or WiFi) before using the application.

Additionally, if you obtained this app from a Vendor Store (including extensions), then the Store operator may track your usage of the app (e.g. download, install, uninstall, date and number of sessions) for the purpose of providing anonymous, aggregate usage statistics to developers. If this concerns you, you should check the relevant Store Privacy Policy for further information.

Builds of this app are available that do not use a Store or an online Service Worker. Please see:

- Releases
- NWJS version - this version is completely standalone and will never self-update.

### Expert or experimental settings

Depending on your browser or framework, this app may be capable of running in two different modes, which we call "JQuery Mode" and "ServiceWorker Mode" for short. There is a toggle under Expert Settings in Configuration. Here is an explanation of what these modes do:

- JQuery Mode: This mode (which does not in fact require JQuery) is fine for everyday use with Wikipedia / WikiMedia archives, and is stable and safe. It is a way of inserting articles extracted from the ZIM into the DOM (browser document) by injecting the content into an iframe or tab. We then use native DOM methods, or sometimes JQuery, to parse the article's HTML and insert required assets (images, stylesheets, event listeners for hyperlinks, etc.). On old devices DOM traversal can be slow, but it is compensated for because we do not extract or run JavaScript assets (which would be technically extremely complicated). As a result, for WikiMedia archives this mode is usually quite fast. On the downside, ZIMs that have a proprietary dynamic UI (such as Gutenberg or TED talks) are only partially supported in this mode: the UI does not work, but articles can be searched for and loaded from the search bar.
- ServiceWorker Mode: This mode, as its name implies, requires that the browser or framework be capable of installing a Service Worker. It works by intercepting the browser or framework's Fetch calls (network requests) and supplying the requested content from the ZIM. This mode requires no DOM traversal, and the content is read and supplied as-is from the archive. Dynamic content (e.g. JavaScript) and proprietary UIs are fully supported in this mode. It can feel initially a little slower while commonly used assets are being cached, but it soon equals JQuery mode in speed, at least in modern browsers. However, older browsers such as IE11 do not support this mode, and the app must be running in a secure context (https:, localhost, or certain browser extensions). Note that this mode also cannot run under the file: protocol (but only IE11 and old Edge allow the app to run this way).

### Feedback / helping / contributing

This application is still a work in progress. There are bugs that still need fixing and improvements that need to be implemented. Suggestions and patches/pull requests are welcome: the source code is on github. The Kiwix JS Windows issue tracker is on GitHub too, though also check the tracker for Kiwix JS as a lot of the development is done for both apps.

Alternatively, you can send your feedback by email .

In all cases, please give as much detail as you can: which device you are using, which version of Kiwix, which archive, which articles etc.

If you like the Kiwix project and use it, please consider giving donations:

- to the Wikimedia foundation, to help maintaining their servers and article contents. See the donation page
- to Kiwix, to help maintaining the ZIM files and applications. There is a donation button in the home page of kiwix.org

You can also help by:

- Adding articles or improving the existing ones, by editing online Wikipedia articles
- Participating in the Kiwix project

### Credits

Thanks are due to:

- Kelson and all the Kiwix community for welcoming peter-x, mossroy, jaifroid and sharun-s onto this project
- Wikipedia teams and contributors for helping to spread knowledge to everybody
- All the developers of libraries and tools we use for releasing them as Free software (see Licence paragraph)

### Licence information

Copyright 2013-2019 Mossroy, Peter-x, Jaifroid, sharun-s and other contributors
Jaifroid for adaptation and development of the app on the Universal Windows, Electron, NWJS and PWA Platforms
This application is licensed under the GPL v3 licence:
Kiwix is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licence as published by
the Free Software Foundation, either version 3 of the Licence, or
(at your option) any later version.
Kiwix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public Licence for more details.
You should have received a copy of the GNU General Public Licence
along with Kiwix (file LICENSE-GPLv3.txt). If not, see https://www.gnu.org/licenses/

Main libraries and resources used:

- jQuery 3, released under the MIT Licence
- Bootstrap 3, released under the Apache Licence 2.0, which includes icons from Glyphicons
- RequireJS 2, released under the MIT licence or new BSD Licence
- QUnit 2, released under the MIT Licence
- Kiwix logo from kiwix.org, released under the Creative Commons Attribution Share Alike Licence
- OpenZIM specifications from www.openzim.org, released under the Creative Commons Attribution Share Alike Licence
- Emscripten to generate a XZ decompressor in javascript : https://github.com/kripken/emscripten, released under the MIT Licence
- XZ Embedded (the XZ library converted to Javascript with Emscripten), in public domain
- The Zstandard library, released under a BSD Licence and a GPLv2 Copying Licence
- KaTeX for typesetting mathematical and chemical equations, released under the MIT licence
- Hilitor for finding and hilighting text inside an article, released under this licence

### Other platforms/versions

Other Kiwix clients exist on various platforms. See the official site : https://www.kiwix.org/.

## Configuration

Packaged ZIM archive:

Download more archives from the Archive Library.

For more information see About tab (top right)

Scanning for archives... Please wait

Archives found on this device (tap "Select storage" to rescan):

There were no ZIM file(s) found in the selected location! Please choose a different folder.

For a single unsplit archive

For multiple or split archives

Please choose the location of your ZIM archive or drag-and-drop the file(s) here.
For a split archive (.zimaa, .zimab, etc.) you must select all the split parts.

Only Wikimedia contents (wiki*.zim* files) have been tested well with this app.

| Tap to select app's local storage or to select a file or folder. You can also drag and drop a ZIM file into the app.

### Download library

Get more ZIM archives here. Archives can be very large, do not attempt to download using mobile data!

| Opens library of archives for download: Warning: this will use data

Allow Internet access?

### Display settings

Dark mode:
Set dark mode for User Interface: [ ] (auto mode uses UWP system Settings if available) Set dark theme for articles: [ ] (experimental: tested with Wikimedia ZIMs) Use simple inversion for dark theme (should work with all archive types)
Display style:
Select style automatically (recommended: matches the ZIM style) Use Wikimedia desktop style (and transform if necessary) Use Wikimedia mobile style (and transform if necessary) Remove max page width restriction: [ ] (useful for recent Wikipedia archives)
Display options:
Hide toolbars while scrolling: [ ] (scroll slightly up to reveal) Change font size for the User Interface: Current value: 100%
(to change article font size, tap and ) Use locally cached display styles (recommended for Wikipedia ZIM) Display images if any (if hidden, tap the blue area to display one-by-one) Permanently hide active content warning (for experienced users) Start character of alphabet: (use capital letters if they exist in your locale)
End character of alphabet: (these are used to set appropriate alphabet for the Archive Index) Set max number of search results to display: (higher number will result in slower search performance) Enable opening articles in a separate browser tab (slightly increases app's memory usage) Open all headings (for WikiMedia ZIMs: sets the state of collapsible headings on article load)

### Privacy settings

Persistence of data:
Reopen last-visited page on next app launch

### Expert settings

Display hidden ZIM archive selectors:
Display selectors for files and folders : This is for downloading other ZIM archives.
Mathematical and chemical equations and symbols:
Typeset TeX equations with KaTeX (recommended: very fast, but not all symbols may be supported in all languages; will use SVG fallbacks if TeX string not available) Use SVG fallback images (very slow and memory hungry, but will dislplay all symbols)
Content injection mode

See About (Expert Settings) for an explanation of the difference between these modes:

JQuery (stable and safe) ServiceWorker (not available on all platforms, but supports more ZIM files)
API Status
You can search the content of your ZIM archive by typing in the above search field.
It will suggest articles starting with the letters you type.