Make sure static asset caching is properly configured on staging and production. Make sure iOS caches stuff. Etc.
The Safari Audit complains about: Leverage browser caching (20) The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers: https://pancake.mozillalabs.com/ require.js root.app.js zepto.js verifiedemail.browser.js errors.js noisy.js logger.browser.js objecttools.js underscore.js The following resources are explicitly non-cacheable. Consider making them cacheable if possible: index.css index.css giantpancake.png btn_browserid.png include.js background-gradient--pattern.png paper-med-trans--pattern.png opensans-regular-webfont.woff opensans-light-webfont.woff opensans-semibold-webfont.woff
Assigning to Gozer. Will add some details on how we did this on the old setup on Rackspace.
On our old production Apache servers we also had: ExpiresActive On ExpiresByType image/png M86400 ExpiresByType application/javascipt M86400 ExpiresByType text/css M86400
TL;DR ... iOS has no persistent web asset caching. We need a different strategy. So I have been looking at https://bugzilla.mozilla.org/show_bug.cgi?id=748092 to find out the best server-side settings to maximize caching of static assets. That turned out to be rather pointless because iOS simply does not do persistent caching. This means that: * When you reboot your device, the cache is emptied * When your app gets killed because of low memory (yay multitasking), the cache is emptied * When you manually kill the app, the cache is emptied * When you app starts using a certain amount of memory, stuff gets removed from the cache There is no persistent caching. There are a couple of things we can do though: 1) We can combine assets (one huge JS file, one huge PNG file, one huge CSS file, etc.) to minimize the number of requests 2) To prevent things from being doubly loaded we can load all our assets from /root so that they will be hot in the local non-persistent cache when /main, /account and /drawer need them. 3) We should investigate moving stuff to local storage or use a cache manifest for offline apps (although I am not completely sure how iOS deals with that, I am reading mixed results)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.