-
Notifications
You must be signed in to change notification settings - Fork 7
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
WebKit is caching content unnecessarily #11
Comments
dylanmccall
added a commit
that referenced
this issue
Aug 26, 2021
This should result in improved performance when using local files. Closes #11
I thought the following patch might help. Unfortunately, it seems that using DOCUMENT_BROWSER cache model also means cookies will not persist, so the user needs to sign in to Kolibri every time they open the app. diff --git a/src/kolibri_gnome/desktop_launcher/application.py b/src/kolibri_gnome/desktop_launcher/application.py
index 5a5ced7..e195c64 100644
--- a/src/kolibri_gnome/desktop_launcher/application.py
+++ b/src/kolibri_gnome/desktop_launcher/application.py
@@ -22,6 +22,7 @@ import gi
from gi.repository import GLib
from gi.repository import Gtk
+from gi.repository import WebKit2
from .. import config
@@ -296,6 +297,10 @@ class KolibriWindow(KolibriView):
if KOLIBRI_APP_DEVELOPER_EXTRAS:
self.gtk_webview.get_settings().set_enable_developer_extras(True)
+ self.gtk_webview.get_context().set_cache_model(
+ WebKit2.CacheModel.DOCUMENT_BROWSER
+ )
+
self.gtk_webview.connect("create", self.__gtk_webview_on_create)
self.gtk_webview.connect("notify::uri", self.__gtk_webview_on_notify_uri)
self.gtk_webview.get_back_forward_list().connect( |
dylanmccall
pushed a commit
that referenced
this issue
Apr 5, 2022
…-check Fix error checking auto provision file keys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WebKit is caching content served by Kolibri. This is unnecessary, since we can expect Kolibri to respond very quickly to any requests, and the cost of maintaining this cache probably outweighs any benefit of having it.
The text was updated successfully, but these errors were encountered: