summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--browser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/browser.c b/browser.c
index 2facd88..56ecfd2 100644
--- a/browser.c
+++ b/browser.c
@@ -841,8 +841,9 @@ icon_location(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent *event,
void
init_default_web_context(void)
{
- gchar *p;
+ gchar *p, *cf;
WebKitWebContext *wc;
+ WebKitCookieManager *cookiemanager;
wc = webkit_web_context_get_default();
@@ -856,6 +857,7 @@ init_default_web_context(void)
p = g_build_filename(g_get_user_config_dir(), __NAME__, "web_extensions",
NULL);
+ cf = g_build_filename(g_get_user_cache_dir(), __NAME__, "cookies.txt", NULL);
webkit_web_context_set_web_extensions_directory(wc, p);
g_free(p);
@@ -868,6 +870,9 @@ init_default_web_context(void)
trust_user_certs(wc);
webkit_web_context_set_favicon_database_directory(wc, NULL);
+
+ cookiemanager = webkit_web_context_get_cookie_manager(wc);
+ webkit_cookie_manager_set_persistent_storage(cookiemanager, cf, WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
}
gboolean