Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Delete cookies of QML WebView
Forum Updated to NodeBB v4.3 + New Features

Delete cookies of QML WebView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 514 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.
  • raven-worxR raven-worx

    @i.n.g.o. said in add header to WebView requests:

    i am trying with Qt 5.12.2 right now.

    on mobile platforms the native webview is displayed (over the QML content). No chance to intercept the requests, for security reasons.
    As i said, QML is not involved and QQmlNetworkAccessManagerFactory is used for loading QML resources.

    Your only chance would be on Desktop to use QWebEngineHttpRequest

    Q Offline
    Q Offline
    QCharacter
    wrote on last edited by
    #1

    @raven-worx So do we have any other method to delete the cookies in the QML WebView ?

    raven-worxR 1 Reply Last reply
    0
    • Q QCharacter

      @raven-worx So do we have any other method to delete the cookies in the QML WebView ?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @QCharacter
      i forked the topic, since it has nothing to do with QtWebKit.

      The only way i am aware of to do this with QML WebView is to run JavaScript and delete all cookies from there

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QCharacter
        wrote on last edited by
        #3

        @raven-worx said in Delete cookies of QML WebView:

        The only way i am aware of to do this with QML WebView is to run JavaScript and delete all cookies from there

        Do we have some examples on the same or if you can point me to some right forum discussion proposing tentative solution and i can try implementing it. Thanks a alot.

        raven-worxR 1 Reply Last reply
        0
        • Q QCharacter

          @raven-worx said in Delete cookies of QML WebView:

          The only way i am aware of to do this with QML WebView is to run JavaScript and delete all cookies from there

          Do we have some examples on the same or if you can point me to some right forum discussion proposing tentative solution and i can try implementing it. Thanks a alot.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @QCharacter
          ther a tons of JS snippets on the web how to delete cookies.
          Anyway i am afraid you will never be able to delete ALL cookies for all webpages in the browser with QtWebView.

          You might have better chances with WebEngineView to access the cookies.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            QCharacter
            wrote on last edited by
            #5

            I agree about the Javascript usage to delete cookies but when used in QML we have to access an element by "id" which in our case has to be QML WebView component id which inturn doesn't have any "cookies" property as opposed to Javascript Document Object. Hence i am failiing to implement any method to delete cookies. Am i missing on to something here (P.S: i never learnt JS and could gather these info from other forum solutions) ?
            Thanks

            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