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. Delay while storing cookies to disk

Delay while storing cookies to disk

Scheduled Pinned Locked Moved Unsolved QtWebEngine
5 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    ab0027
    wrote on last edited by
    #1

    Hello,

    I am trying to store some cookies from a webpage loaded in a WebEngineView Component in QML.

    The cookies are getting stored to disk but I am noticing a delay of about 30-50 secs before the cookie gets stored to disk after being set with Javascript on the page.
    Is there a way to control the polling frequency?

    Thanks in advance.

    JonBJ 1 Reply Last reply
    0
    • A ab0027

      Hello,

      I am trying to store some cookies from a webpage loaded in a WebEngineView Component in QML.

      The cookies are getting stored to disk but I am noticing a delay of about 30-50 secs before the cookie gets stored to disk after being set with Javascript on the page.
      Is there a way to control the polling frequency?

      Thanks in advance.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @ab0027
      I am not an expert, but (so far as I know) browser engines can take any amount of time they wish to actually store a cookie to disk, for efficiency. You are not supposed to care when they physically save to disk, so why do you care?

      I assume this would be an internal feature of the Chromium component, not QML/Qt.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ab0027
        wrote on last edited by
        #3

        The thing is if I close the application just after setting the cookie before it writes to disk, the cookies gets lost. Which is why I want to make sure the cookies are being written to disk before the application gets closed.

        JonBJ 1 Reply Last reply
        0
        • A ab0027

          The thing is if I close the application just after setting the cookie before it writes to disk, the cookies gets lost. Which is why I want to make sure the cookies are being written to disk before the application gets closed.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @ab0027
          That doesn't sound right, if the cookie is a persistent one, not just a session one.

          You can Google for: qml WebEngineView cookie. There may be something there. Some of the posts are older. This is not my area, but is QML WebEngineView Component using Qt's newer Chromium component or the older WebKit one? Be careful when you read up if that's an issue.

          If you haven't done so already, perhaps look through code of https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-cookiebrowser-example.html to see what they do/report compares to yours.

          Otherwise await an expert here to help you further....

          A 1 Reply Last reply
          0
          • JonBJ JonB

            @ab0027
            That doesn't sound right, if the cookie is a persistent one, not just a session one.

            You can Google for: qml WebEngineView cookie. There may be something there. Some of the posts are older. This is not my area, but is QML WebEngineView Component using Qt's newer Chromium component or the older WebKit one? Be careful when you read up if that's an issue.

            If you haven't done so already, perhaps look through code of https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-cookiebrowser-example.html to see what they do/report compares to yours.

            Otherwise await an expert here to help you further....

            A Offline
            A Offline
            ab0027
            wrote on last edited by
            #5

            @JonB I was also very confused why it was getting delayed. I already tried searching the different forums and no one reported similar issues.
            Might have got introduced recently.. I am currently going through the sources of webengine to check how cookies are being handled.

            I think I need to create a bugreport afterall.

            https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-cookiebrowser-example.html

            I alredy saw this example code but didnt yet test this example. Will try once.

            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