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