Tuesday, September 11th, 2007

Making offline web applications even simpler:

Category: Offline

Ian Hickson has been doing a great job defining how web pages can declare themselves as applications, and can thus work offline.

He has seen that there is a common case, which is “When you build a true web application, many people do so via the single page model”. If you take this assumption, wouldn’t it be nice to tag the top page as an application, and have the browser subsystem take care of caching files and using them correctly when offline. His assumption is based on the logic that: “If you have complicated server logic you use a multiple page application, which isn’t going to do much in an offline mode anyway, as it has complicated server logic!”.

Some people do not subscribe to this view, and think that there is a lot of multiple page applications that can be made to be web enabled, and so his latest thoughts take that into consideration.

The idea is that you can then <html application=”manifest-of-urls.txt”> and use a different path. He starts with:

Ok, new proposal:

There’s a concept of an application cache. An application cache is a group
of resources, the group being identified by a URI (which typically happens
to resolve to a manifest). Resources in a cache are either top-level or
not; top-level resources are those that are HTML or XML and when parsed
with scripting disabled have with the value of
the attribute pointing to the same URI as identifies the cache.

When you visit a page you first check to see if you have that page in a
cache as a known top-level page.

If you do, skip the next two paragraphs; the ‘new cache’ flag is set to

…. and the logic keeps going ….

Seeing simpler and simpler offline support is great.

Posted by Dion Almaer at 9:41 am

3.4 rating from 27 votes


Comments feed TrackBack URI

Doesn’t XUL take care of this already?

Comment by Andy — September 11, 2007

Cool idea, but why adding a new attribute to html, when one can use the framework already provided by the link tag of the html’s spec? Something along the lines of…

My 2 cents.

Comment by Rui — September 11, 2007

Darn html filter…

I meant

<link rel=”application” type=”text/plain” href=”manifest-of-urls.txt” />

Comment by Rui — September 11, 2007

Nice Idea

Comment by sachin — September 12, 2007

Finaly jQuery UI released (as promised).

Comment by jmav — September 17, 2007

Leave a comment

You must be logged in to post a comment.