diff --git a/config.def.h b/config.def.h
index b81e6b0..d6b62fc 100644
--- a/config.def.h
+++ b/config.def.h
@@ -12,6 +12,7 @@ static Bool kioskmode	    = FALSE; /* Ignore shortcuts */
 static Bool showindicators  = TRUE;  /* Show indicators in window title */
 static Bool zoomto96dpi     = TRUE;  /* Zoom pages to always emulate 96dpi */
 static Bool runinfullscreen = FALSE; /* Run in fullscreen mode by default */
+static guint cookiepolicy   = 0;     /* 0: always, 1:never, 2:no third party */
 
 static guint defaultfontsize = 12;   /* Default font size */
 static gfloat zoomlevel = 1.0;       /* Default zoom level */
diff --git a/surf.c b/surf.c
index f0be24b..7f415c1 100644
--- a/surf.c
+++ b/surf.c
@@ -296,9 +296,12 @@ cookiejar_init(CookieJar *self) {
 
 static SoupCookieJar *
 cookiejar_new(const char *filename, gboolean read_only) {
-	return g_object_new(COOKIEJAR_TYPE,
+	SoupCookieJar *soupcookiejar;
+	soupcookiejar = g_object_new(COOKIEJAR_TYPE,
 	                    SOUP_COOKIE_JAR_TEXT_FILENAME, filename,
 	                    SOUP_COOKIE_JAR_READ_ONLY, read_only, NULL);
+	soup_cookie_jar_set_accept_policy(soupcookiejar, cookiepolicy);
+	return soupcookiejar;
 }
 
 static void
