I don't know what framework you are using, but in Sencha, you need to specify to use the network by doing something like this:
NETWORK:
*
If you have things in your manifest file, it will always use that cached copy, which is what you are experiencing. So that is the default behavior for items that are in your manifest file.
Now, it gets a little trickier.
Article: http://www.sencha.com/learn/taking-sencha-touch-apps-offline/
In this Sencha offline example, they set a proxy for cached database, and then switch between the browser cache and the local storage.
Then, you want to create a listener without a timeout to detect if you are offline or online.
If you timeout, then use the local proxy. Like this:
this.onlineStore.addListener('load', function () {
console.log("I think we are online");
helloWorld.offlineStore.proxy.clear();
this.each(function (record) {
var photo = helloWorld.offlineStore.add(record.data)[0];
});
helloWorld.offlineStore.sync();
helloWorld.gallery.bindStore(helloWorld.offlineStore);
});