3 Replies Latest reply on Feb 4, 2012 9:50 AM by Garrick van Schalkwyk

    How to use Application Cache in RhoElements?

      Hello,
      Do you have an example of how to use the Html5 Application Cache?

      I'm try to use the Application Cache to have my application available also in offline mode, but it is not working.

      I have the same code running correctly in Chrome, Safari and Safari Mobile (on iPad), so the manifest file is set up properly.

      The problem is that the application seems not to be available offline.

      The config file contains the <ApplicationCache> tag.
      The General tag is set like this:

      <General>
                <Name value="Menu"/>
                <StartPage value="http://192.168.0.116:61840/static/t/index.html" name="test"/>
      </General>

       

      (see file in attachment)

       

      This is what I do:
      1) with WiFi on, I run RhoElements
      2) RhoElements properly download and displays the application. The application cache also is created, since I can see the ApplicationCache.db file and it has content inside.
      3) exit from RhoElements
      4) turn WiFi off
      5) run RhoElements again

       

      Than I see the error page and it tells me that it cannot load the page.

       

      Where is the problem? Am I doing things in a wrong way or is there something missing? See attached.
        • Re: How to use Application Cache in RhoElements?

          Hello again,
          from other tests I saw that it works in this way:

          a) with WiFi on, run RhoElements
          b) point to the url of the web application and it is put in the cache
          c) turn off WiFi
          d) point again to the cached URL and it works

          When it doesn't work is when you exit from RhoElements and then run it again.
          If I run RhoElements  again the ApplicationCache database is "reset" to its initial state.
          This behaviour should be set in the Config.xml file, to my opinion.

          • Re: How to use Application Cache in RhoElements?

            Hi All,

             

            We've been toying around with App Caching on Rhoelements and have had some success. What we are not getting right is the Fallback section. Regardless of what we specify here, the page served up by the <BadLinkURI> is always displayed when we are offline. Does this mean that this Rhoelement feature trumps that of HTML5 or are we doing something wrong? We tried several approaches, having an Error.html page that we marked as cacheable on our remote server, aswell as trying to have this page local to the device.

             

            Any advise is appreciated.