IOS Cordova app requesting a new version of files in public multiple times

Feel like I’m missing something obvious here.

I have static image assets, and am building for ios. Running in the simulator, as I browse through the app and watch the attached safari timeline section I see the app making requests for images it has already fetched with the “Cached” column set to “No”.

One thing to note, I have some files packaged and some files in the app public folder. Both have the same behavior.

I may be using XMLHttpRequest incorrectly, but if I curl the images from localhost I see the cache-control headers set, but if I request in safari via

var xmlHttp = new XMLHttpRequest(); "GET", '/images/foodnews.svg', false );
console.log( xmlHttp.getAllResponseHeaders() );
// "Content-Type: image/svg+xml"

Any tips on how to determine the cause of this? Is it expected behavior?

This is expected behavior with the current version of Meteor. Note that those files are coming from meteor.local however, which runs locally to the device, so the performance impact shouldn’t be too bad.

For 1.3, I’ve rewritten our Cordova plugin to use a true local web server on iOS, paying particular attention to improving caching. Not sure yet if I can improve caching for Android too, because it uses a different file serving strategy.