Skip to content
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

Consider officially supporting the Dillo browser #714

Open
rodarima opened this issue Oct 19, 2024 · 2 comments
Open

Consider officially supporting the Dillo browser #714

rodarima opened this issue Oct 19, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@rodarima
Copy link

Disclaimer: I maintain the Dillo graphical web browser.

I think Kiwix should work on old and low resource computers. Currently, the kiwix-desktop requires Qt WebEngine, which is implemented on top of Chromium on most platforms. This raises the requirements to load mostly text with images websites, and it is in my opinion an unnecessary requirement in most cases.

The kiwix-tools allow you to serve the documents as a HTTP server, so we can choose a more lightweight web broser and avoid the dependency on Chromium. Dillo is a graphical web browser that runs on very old and constrained machines, but it doesn't support Javascript. It can render HTML pages mostly fine, but there is one important feature that doesn't work: searching for content. Here is an example of the Arch wiki:

Image

And here is the comparison in memory consumption from Dillo to the official Kiwix desktop program as seen by the top program (memory numbers are in KiB):

% top -p $(pgrep dillo) -p $(pgrep kiwix-desktop) -p $(pgrep kiwix-serve)

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 452543 ram       20   0 3549324 330804 220808 R   5,0   2,0   0:01.38 kiwix-desktop
 452278 ram       20   0  111512  27084  20044 S   0,0   0,2   0:00.09 dillo
 440786 ram       20   0  439396  55544  23264 S   0,0   0,3   0:00.12 kiwix-serve

You can see that Dillo uses 27 MiB of resident memory (RES), while kiwix-desptop requires 330 MiB to load the same page. Even if you combine kiwix-serve + Dillo, it only reaches 1/4 of the memory usage of kiwix-desktop, but the server can be offloaded to another machine if needed.

By just implementing a simple mechanism to search for content without JS you'll implement all basic functionality and allow users of older machines to use Kiwix on Dillo (and probably other non-JS browsers too). See #634.

I would kindly ask you to consider adding Dillo as an officially supported browser for kiwix-serve, so you ensure that users can use Kiwix without having to load a full Chromium browser. Searching is the only main feature missing I can see so far.

@kelson42 kelson42 self-assigned this Oct 19, 2024
@kelson42 kelson42 added this to the 3.8.0 milestone Oct 19, 2024
@kelson42
Copy link
Contributor

kelson42 commented Oct 20, 2024

@rodarina I'm afraid that we can not guaranty that any ZIM and Kiwix Server feature works without Ja as ript engine. But maybe I didn't understand properly what you requested.

@rodarima
Copy link
Author

You already provide a non-JS based implementation of all important features.

The only problem is that it cannot be queried from a non-JS page.

This simple HTML page:

<!DOCTYPE html>
<html>
  <head><title>Search kiwix</title></head>
  <body>
    <p>Search for a page in all Kiwix catalogs:</p>
    <form action="http://localhost:8080/search">
      <input type="text" name="pattern" placeholder="Term...">
      <input type="submit" value="Search"/>
    </form>
  </body>
</html>

Shows a simple search bar on Dillo (and any other browser):

Image

And allows me to search pages that match a particular term, for example GPU in the Arch Wiki:

Image

Without having executed a single line of JS.

What I'm asking is that you provide a plain HTML interface to all (or at least the essential) functionality that kiwix-serve currently provides via JS, so it can be used by Dillo. You can just add a similar search form to the /nojs endpoint, so we can perform searches of content (not searches of elements of the catalog as we have now). Probably you can add a <select> input element to allow the user to search only in one catalog instead of all.

By officially supporting Dillo I mean that you don't introduce a dependency over JS to perform a task that could be done without it and ensure we can continue to use Dillo (or any other simple web browser) to browse, search an read Kiwix pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants