Now that the CDN module's Far Future expiration support has landed (#974350: Far Future setting for Origin Pull mode), we can do something very cool: use localStorage and app cache to enforce even longer caching.
Browsers that support LS (localStorage) & AC (app cache) don't tend to flush those. The "regular browser cache", which is the one that's being used thanks to Far Future expiration, *does* get flushed relatively frequently (and depending on the device). Since it is now easy to track which resources can be cached permanently (any with a "cdn/farfuture/" substring), it is also fairly easy to leverage these caches.
This will especially make repeat visits on mobile devices significantly faster.
Comments
Comment #1
Wim LeersWe'll have to take http://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-s... into account.
Comment #2
Wim LeersAlso see http://drupal.org/project/appcache and http://drupal.org/sandbox/Crell/1284648.
Comment #3
Wim LeersWe may be able to learn from http://std.li/pastel/home.html#docs as well.
Comment #4
Wim LeersMore relevant links:
- http://www.alistapart.com/articles/application-cache-is-a-douchebag/
- http://diveintohtml5.info/offline.html
Comment #5
Wim LeersIrrelevant now that we have https://www.drupal.org/project/pwa and https://www.drupal.org/project/offline_app.