zeroasterisk / MeteorRider

PhoneGap/Cordova + Meteor integration approach "DOM hijacking", telling PhoneGap where to get content from, letting Meteor hijack your PhoneGap app's HTML/CSS/JS
MIT License
183 stars 28 forks source link

AppCache lost on iOS after restarting app #34

Open waeltken opened 10 years ago

waeltken commented 10 years ago

The HTML gets loaded from localStorage and is replace in the dom. Sadly meteor's own javascript seems to be deleted from localStorage or HTML cached content.

<script type="text/javascript" src="http://test.meteor.com/06c26469ec6a40a1d52df5dc184c3c64bc4eb404.js"></script>

The reason for this is probably related to iOS handling of localStorage clearing the content of localStorage on app restart. Can we backup this file and maybe the stylesheet as well and restore them too? Basically all files marked as cached in app.manifest should be stored. Note that on Android there seems to be no such issue.

zeroasterisk commented 10 years ago

indeed - this is a planned feature... was going to load the JS and CSS from Meteor in the background, store them, and then inline them on initial load of the HTML... (assuming the URLs all match)

You might also checkout: https://github.com/andrewreedy/meteor-appcache-extra

And an alternative to MeteorRider I'm looking into: https://github.com/andrewreedy/cordova-loader