KIO / KWebView and PrivateBrowsing (Cookies)

Alex Fiestas afiestas at kde.org
Thu Apr 26 16:17:38 BST 2012


On Wednesday, April 25, 2012 04:26:28 PM Dawit A wrote:
> On Wed, Apr 25, 2012 at 1:05 PM, Alex Fiestas <afiestas at kde.org> wrote:
> > On Wednesday, April 25, 2012 10:23:27 AM Dawit A wrote:
> > > On Tue, Apr 24, 2012 at 8:13 AM, Alex Fiestas <afiestas at kde.org> wrote:
> > > > After reading the patch and understanding a little bit more how this
> > 
> > work
> > 
> > > > I
> > > > reached the following conclusion (potentially wrong as before :p).
> > > > 
> > > > storageDisabled should work as it does right now (without the patch),
> > 
> > it
> > 
> > > > does
> > > > disable any storage and allow reading, which imho it is exactly what
> > 
> > you
> > 
> > > > expect from "disable storage".
> > > > 
> > > > So, how do we enable Private Browsing in AcessManager?
> > > > By setting a different CookieJar, the default Qt implementation will
> > > > do
> > > > the
> > > > job perfectly storing all the cookies in memory until the jar is
> > 
> > destroyed
> > 
> > > > (Private Browsing disabled).
> > > > 
> > > > Right now any new CookieJar set via
> > > > QNetworkAccessManager::setCookieJar
> > > > will
> > > > be ignored by Integration::AccessManager since at the end kio_http
> > > > will
> > > > use
> > > > the "auto" cookie mode.
> > > > 
> > > > So, the solution should be:
> > > > 
> > > > -Fix the support for external QNetworkCookieJar's, this will have to
> > > > be
> > > > done
> > > > anyway since Integration should have support for it.
> > > > 
> > > > -Fix KWebPage to set a custom CookieJar when private browsing is
> > > > activated.
> > > > 
> > > > What do you think? does it make any sense at all this time?
> > > 
> > > Well actually it is a little bit simpler than that to get to what you
> > 
> > want.
> > 
> > > Keeping only the portion of my patch that deals with disabling cookie
> > > handling in kio_http along with you setting your own custom cookiejar
> > > through QWebPage::networkAccessManager()->setCookieJar should be
> > 
> > sufficient
> > 
> > > for what you are trying to do.
> > 
> > I will try to provide a patch, thanks for the support !
> 
> If you wait a litte while I am going to fix this issue once and for all
> since I want to add proper support for "Private browsing mode" in
> kwebkitpart. I am sure the reKonq guys/gals will appreciate that as well.
Oookz !

> Why unnecessarily waste memory ? I personally do not like this idea. For
> every application that starts its own "private browsing mode" there will be
> a separate instance of kcookiejar ? That is completely unwarranted. Plus
> there will most definitely be unforeseen consequences for having multiple
> instances of kcookiejar running. For example, you cannot predict how the
> cookie management dialog would behave under such circumstances.
I don't know the details of KCookieJar so no, I don't know what problems such 
things could have. Nonetheless when it comes to privacity and security being 
able to have your own KCookieJar separated completely from the one where the 
global cookies are stored can come handy, anyway this is up to you/KCookieJar 
maintainer not me :p




More information about the kde-core-devel mailing list