[wp-trac] [WordPress Trac] #7262: Use Firefox 3.5 native offline cache to add "turbo" functionality

WordPress Trac wp-trac at lists.automattic.com
Thu May 20 01:36:17 UTC 2010


#7262: Use Firefox 3.5 native offline cache to add "turbo" functionality
--------------------------+-------------------------------------------------
 Reporter:  mfinkle       |       Owner:  azaozz        
     Type:  enhancement   |      Status:  new           
 Priority:  normal        |   Milestone:  Future Release
Component:  Optimization  |     Version:                
 Severity:  normal        |    Keywords:  needs-patch   
--------------------------+-------------------------------------------------

Comment(by azaozz):

 Replying to [comment:59 blizzard@…]:
 > Yeah, when we had our caching summit a few weeks ago...

 Unfortunately I wasn't able to attend this time.

 >
 > Note that the localstorage thing is actually two things:
 >
 > localStorage (in all major browsers today)
 > IndexedDB (prototyping in IE, Chrome and Firefox)

 We are not using the DB part at all.

 > But that doesn't help with super-aggressive caching, which is what I
 think you want.

 It's not even supper-aggressive catching. It is a "server managed catching
 in the browser".

 What we currently do in Gears:

 1. The browser downloads all "static" files (JS, CSS, images) and stores
 them in the local storage for the current domain. The URLs for these files
 are in the manifest.

 2. Whenever a web page coming from the same domain requests one of these
 files it is fetched from the local storage instead of the server. This is
 handled automatically by Gears and no requests are made to the server at
 all.

 3. Gears downloads the manifest frequently (or this can be triggered
 manually from JS) and compares it with the previous version. If the
 manifest has different version string it parses it again, downloads the
 new/changed files and removes old files that aren't listed there any more.
 So when we need to refresh a file we change the manifest version and
 update the listed URL in it. All this happens in the background.

 The end result is that when the user enables it, this stores about a
 megabyte of "static" content on their hard drive and eliminates about 90%
 to 95% of the requests to the server, even the HEAD requests. This of
 course speeds up page loading considerably and also reduces unneeded web
 traffic.

 It is possible to achieve something similar (but not as straightforward)
 with super-aggressive caching however that is much harder as it is
 controlled by the web server/hosting company and there are literally
 thousands of different configurations that have to be taken into account.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7262#comment:60>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list