W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Cache Manifest: why have FALLBACK?

From: Ilkka Huotari <ilkkah@gmail.com>
Date: Tue, 19 Apr 2011 04:30:31 +0300
Message-ID: <BANLkTik_vLBANf-OKLVSX5bi_yt=f0cGAA@mail.gmail.com>
This is a reply to an old discussion:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-September/023137.html

Now, I haven't probably thought this enough, but could the FALLBACK
and NETWORK be combined into one NETWORK? Both are doing pretty much
the same thing after all?

Here's how it would work:

NETWORK:
<item> [optional-fallback-item]

More specific entries would take precedence, i.e. /file.html would be
more important than /file or / or * ... Example:

NETWORK:
*
/ /offline
/file.html /offline-for-file.html

This way
- "*" would map like it does in the current spec
- "/ /offline" would map like it does in the FALLBACK section/current
spec and would take precedence over "*" because it's more specific
over *"*
- "/file.html /offline-for-file.html" would take precedence over all of these.

Benefits: Making things simpler, easier for the programmer to
understand. Faster to learn, less bugs, better code?

Ilkka
Received on Monday, 18 April 2011 18:30:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT