Sencha Touch 2 Showing Old Data After Refresh on Production

I am not totally understanding why even after updating production and seeing the correct delta’s that I am seeing the old site information.

For now: I have figured out that you can clear the local storage in google chrome (very easy to do).

On my andriod device I needed to do the following in the browser url bar:

javascript:localStorage.clear();

This would then allow me to see the newest production site.

I am hoping this problem is because I have been messing around and deleting the production base. Guessing I will learn more once I get closer to actually putting it in production!

3 thoughts on “Sencha Touch 2 Showing Old Data After Refresh on Production

  1. hi,
    Hitting our sencha touch 2 mobile site on a desktop browser (Chrome) works with the delta updates and you will see the update prompt, and reloading shows the updates. However on actual mobile devices (e.g Android 2.3.6) this isn’t working.
    I can confirm that my android device’s browser is correctly initiating a request to fetch .json from the delta directory on the server when there is a change. However, the onUpdated: function() in app.js is never being called and the json update to localStorage is never happening. Of course since it works without issue on desktop browsers this is a tough one to figure out.

  2. Bob,

    Ahh! Interesting! So are you calling the update function directly then to fix the problem?

    – Ryan

  3. I’ve rolled my own workaround to this until the Sencha Touch 2 team fixes what must certainly be a bug (there are sencha forum entries on this but nobody has provided an explanation). On app launch, a call to our REST api fetches a ‘mobileversion’ id (tied to our version control). Using localStorage we can then compare this id and see if an update is needed…in which case (for us) app.js and app.css are fetched to overwrite their versions in localStorage, and user is prompted to reload.

    Right now the latest version of sencha touch 2 seems to be broken if you swap in the production.js microloader in index.html (we can only get it to work with development.js). This post is evidence that these issues (production.js microloader not working & delta updates for mobile devices not working) are likely related – primary sencha architect Jacky actually provided a patch for production.js back in mid April to address a problem found where onUpdated never fired:
    http://www.sencha.com/forum/archive/index.php/t-194928.html?s=01fbdfa3fc614e83da9154862299cca9 But clearly something must have broken since again since then.

Leave a Reply

Your email address will not be published. Required fields are marked *