- From: Nottingham, Mark <mnotting@akamai.com>
- Date: Mon, 8 Apr 2013 02:13:37 -0500
- To: Charles McCathie Nevile <chaals@yandex-team.ru>
- CC: public-webapps WG <public-webapps@w3.org>
On 24/03/2013, at 11:33 AM, Charles McCathie Nevile <chaals@yandex-team.ru> wrote: > Hi, > > we've been talking about appcache inside Yandex. Actually we're not at all sure that appcache is what we really want, so much as an API to use the normal cache better. +1, I'm working on some proposals for this, if folks are interested. > Right now we prefer to use local storage, since appcache isn't actually helpful. Anyway, here are some use cases: > > 1. Initial loading. > Our SERP (and Yandex main page www.yandex.ru) uses embedded styles and scripts for faster loading than with multiple requests for styles/scripts/... > > But users load them every time they visit the results page, because the browser doesn't cache it. It would be nice on the first visit to extract the styles and scripts and store them in the cache. In a SPDY/HTTP2 world, that won't be as necessary, because of the generally lower overhead of requests, as well as server push. Sure, they're not widely deployed yet, but whatever we decide to do here isn't even that far along... > 2. Bundles. > Sometimes we need to load several resources (js/css/json/...) before we can actually show something to user. Like a dialog, or another complex control. Or if it's a single page application before change "page". Again, it's often faster to make one request than several, but it would be even faster if we could then cache them separately: > HttpCache.store(url1, content1); > HttpCache.store(url2, content2); > ... > So that later we can use the files as usual (<script>, <link>...). Same as above. > 3. Diffs (delta updates) > Every static file (js/css/...) has a version, e.g. http://yandex.st/mail/1.3.8/mail.js > Whan we release a new version our users have to download it. It could be hundreds of kilobytes (or more). But the difference between versions is often not very big. So we want to make delta updates. > > It would be nice if we could download the diff, apply it in the browser and store the update in cache e.g.: > > var oldVersion = '1.3.8'; > var newVersion = '1.3.9'; > var oldContent = HttpCache.get(oldUrl); > var newContent = applyPatch(oldContent, patch); > HttpCache.store(newUrl, newContent); > > > 4. Preloading. > Well, we can use normal xhr for that but maybe we can do more with HttpCache. > > Basically we want methods for loading resources, storing them in cache, fetching them from cache, checking if something is in the cache, ... Yep... -- Mark Nottingham mnot@akamai.com http://www.mnot.net/
Received on Monday, 8 April 2013 07:14:07 UTC