ION Not Refreshing Properly

4 posts, 0 answers
  1. Matt
    Matt avatar
    9 posts
    Member since:
    Oct 2012

    Posted 04 Feb 2013 Link to this post

    I have a fairly simple app at this point; an index.html page leads to a landing.html page via a javascript onclick on a button: $.mobile.changePage( "landing.html" );

    The problem is that I can never get the app to load the newest version of landing.html unless I either do a three-finger refresh when I get there. Every time I load it, it loads an old version that appears to be cached somehow. I've tried forcing ION to close, I've tried updating landing.html while tethered with USB, and I've tried updating it through the web IDE and scanning the qcode. This seems like a bug?
  2. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 05 Feb 2013 Link to this post

    Hello Matt,

    I have just tested this with the brand new version of Icenium Graphite and Icenium Ion and it works as expected on my end. Can you please try to uninstall Ion and then install it back again from the AppStore?

    As a side note the latest version of Graphite has the ability to toggle on/off LiveSync per project from the devices list. You can try to switch it off and then on for Ion and see if the your change are going to be synced.

    All the best,
    Stefan Dobrev
    the Telerik team

    Share feedback and vote for features on our Feedback Portal.
    Want some Kendo UI online training - head over to Pluralsight.
  3. Matt
    Matt avatar
    9 posts
    Member since:
    Oct 2012

    Posted 16 Feb 2013 Link to this post

    Sorry for the delayed response. I'm still experiencing some problems with old revisions being loaded. Here's a simple way to reproduce the issue:

    Create an index.html which incldues jquery mobile, and in the body, has a link to test.html
    Create test.html which also includes jquery mobile, and in the body, has a link to index.html
    Open the application in ION and follow the link to test.html
    Change some content in test.html and save it
    In ION, do a three finger refresh on test.html - you will see your new revision.
    Follow the link back to index.html and then again back to test.html - you will still see your new revision.
    Follow the link back to index.html and do a three finger refresh on index.html
    Follow the link back to test.html again - you will see the old version, not your new revision.

    I'm wondering if this is due to the way jquery mobile caches pages after fetching them. I would think this cache would be cleared when doing a three-finger-refresh, but if this is intended functionality, I'll have to disable jquery mobile caching during development / testing.
  4. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 17 Feb 2013 Link to this post

    Hello Matt,

     All Ion does is reload the native UIWebView that hosts the app. There's no special jquery handling.

     Could you please try to add the following code to your index.html:
    $.mobile.page.prototype.options.domCache = false;

     As far as I can tell there isn't a mechanism in jQuery Mobile to empty the whole DOM cache. It seems that there are facilities to remove specific pages, but nothing to remove all.

     We'll investigate this further and try to determine if anything can be done on the native side when using LiveSync. In the mean time, please let me know if the snippet above helps.

    Kind regards,
    Yavor Georgiev
    the Telerik team

    Share feedback and vote for features on our Feedback Portal.
    Want some Kendo UI online training - head over to Pluralsight.
Back to Top