Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QtWebKit Application Cache: does it work?

QtWebKit Application Cache: does it work?

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 5.6k 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.
  • N Offline
    N Offline
    nateo
    wrote on last edited by
    #1

    I built a basic browser using QtWebKit and it works fine except for the application cache feature in HTML 5. Does anyone know if this is supported and works?

    That made me believe it wasn't supported even though it's advertised as supported. When I run the HTML 5 test found here http://html5test.com/ it shows that it does indeed support application cache. However whenever I try to use the JavaScript API to implement an application I can't get it to work. Also if I pull up a demo here: http://html5demos.com/offlineapp it basically does nothing.

    I can access the applicationCache object using: window.applicationCache in JS but I can't get it to read my manifest file or call the checking event. The same JavaScript works great in Chrome and Safari.

    This made me believe I implemented my browser wrong so I tried the demo browser packaged with both Qt 4.7 and Qt 4.8 BETA and had the same results. I then thought I could try the Arora browser as I read it was based on QtWebKit and I have the same result.

    This leads me to believe that although it's listed a supported feature and even though the HTML 5 test shows it's supported that somehow it's broken or I'm missing something to enable it inside my application or maybe it's really picky about my JS implementation.

    Anyone have any insight. Even a finger in the right direction would be helpful.

    Or if you've done something similar any examples would be helpful.

    Thank you!
    Nate

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nateo
      wrote on last edited by
      #2

      Ok, so I figured out the problem. I didn't enable offline web application cache. I assumed since it was supported it was enabled by default, but I guess I wasn't reading the documentation carefully enough that states it disabled by default... oops!

      So basically doing something like this enables it:

      @
      view = new QWebView(this);
      view->page()->settings()->enablePersistentStorage("put_you_path_to_local_storage_here");
      @

      And that did. After recompiling my app loaded all the way through perfect. I did notice that it doesn't seem to be calling the "progress" event on the event listener for window.applicatinoCache, but oh well, that's not so ciritical.

      Hope that helps someone... but then you're probably all better at reading the documentation ;).

      Nate

      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