[Bug 14364] appcache: Add an API to make appcache support caching specific URLs dynamically

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14364

--- Comment #13 from Philipp Hagemeister <phihag@phihag.de> 2012-05-03 21:05:53 UTC ---
The JavaScript redirector sounds fantastic, but it sounds complicated to
implement in the current state.

Wouldn't it be way simpler to just load a defined fallback HTML document? For
example, given the following appcache:

CACHE MANIFEST
ALIAS:
/x.html /serve-file.html
/files/* /serve-file.html
# serve-file.html is automatically included in the appcache

The request to /files/test.html would just render serve-file.html, but under
the original (window.)location (just like FALLBACK does). In fact, ALIAS would
be exactly like a FALLBACK entry that always fails to load. Additionally, the *
placeholder would allow marking whole multiple URLs as belonging to the
manifest.

On review, this seems very easy to implement, both for user agent and web
application authors.

As a downside, it doesn't allow embedding of non-HTML resources like images. It
does allow downloads via window.location.replace(dataUri). To me, that doesn't
like a big deal since any dynamically generated page should be using data URIs
for dynamically generated images/scripts/styles in the first place.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 3 May 2012 21:05:57 UTC