PreviousNext…

Starting with offline web apps: the cache

When coding off-line web applications, you have to use a thing called a “cache manifest” (more on these later, I promise). Put simply, these are text files which dictate to the user agent which web pages, images and resources should go off-line and which should not. The browser will not detect changes you make to your pages, Javascript etc. unless the byte signature of the manifest has changed in some way. Typically one does this by adding and / or removing comment lines in the manifest (as with many languages and config. file formats, these comments start with the good old hash symbol—“pound sign” to my trans-Atlantic chums). I tell you this dear reader, because you can tell the developer’s state of mind by following these comment changes over time.

Let’s look at a typical cache file history over a typical day for a typical (nameless) developer. They start well:

#Build 017 09-Jun-2011 1520

They then… falter:

#WINGNUTS

Frustration kicks in…

#FOR FUCKS SAKE

And then we sometimes find ourselves in a very strange place indeed:

#SLANGPLOPPY doodle

But never fear dear (traumatised) reader! For after all this, we have TRIUMPH!

#HAH! I DID iT you BASTid!

(I can’t recommend moving on to #WHO'S YER DADDY though. That always ends in tears).

(Fret not, proper posts on this topic will be coming soon :-)).

Comments

  1. Ben
    I have finished a web app which includes offline data storage and struggled with the manifest for a long time!

    However, the reusability of offline web apps across multiple platforms makes it a real winner. Will watch your posts with interest!Tim#

Comments on this post are now closed.

About

I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.

";