Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Why is my QtWebEngine still trackable with cookies disabled?

Why is my QtWebEngine still trackable with cookies disabled?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
qt 5.13.2cookiesqtwebengine
1 Posts 1 Posters 407 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Jez1337J Offline
    Jez1337J Offline
    Jez1337
    wrote on last edited by
    #1

    Hello everyone, I'd be grateful for any light shed on the following mystery!

    The problem
    Some websites still know which pages my QtWebEngine browser has visited, even though:

    1. It uses an off the record profile
    2. It has a filter which blocks cookies from being stored in memory

    How are these pesky websites still doing it?!

    Steps to reproduce

    [a] https://nebbia.fitness/en?countryCode=OTHER
    [b] https://nebbia.fitness/eu/c/womens-leggings-sweatpants/classic-hero-high-waist-leggings?color=0

    1. In any browser, ensure you are not browsing in private mode, and visit page [a]
    2. Now visit page [b]. Because you visited page [a] first, you will be automatically redirected

    In a Firefox etc, clearing cookies stops this redirection from taking place.

    However in my QtWebEngine browser, the redirect still happens, even though it's not saving cookies.

    This means that the website somehow still knows I've visited [a] first. How?!?

    Possible explanations

    • Cookies are still being saved - This seems unlikely. I've tested this by spitting out a QMessageBox whenever a cookie is saved. With cookies blocked, those message boxes don't appear, suggesting the filter is working as intended.
    • Websites can track the browser using another method apart from cookies - No idea what this could be. But whatever it is, closing the browser and launching a new one blocks it from happening.

    Relevant code

    view = std::make_unique<QWebEngineView>(this);
    profile = std::make_unique<QWebEngineProfile>();//Creates an off the record profile
    page = std::make_unique<QWebEnginePage>(profile.get(), this);
    
    view->setPage(page.get());
    connect(view.get(), SIGNAL(loadFinished(bool)), SLOT(onLoadFinished(bool)));
    setCentralWidget(view.get());
    	
    //Disables cookies
    view->page()->profile()->cookieStore()->setCookieFilter(
    	[](const QWebEngineCookieStore::FilterRequest &request)
    { return false; }
    );
    
    view->load(url);
    

    System info

    • Qt 5.13.2, x64, using the prebuilt binaries from the Qt website
    • Compiling using Visual Studio 2017, running on Windows 10
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved