views:

399

answers:

3

Hello all,

I am trying a simple test with the html 5 cache.

Here is a simple web page :

<!DOCTYPE html>
<html manifest="test.manifest">
<head>

</head>
<body>
   <img src="http://www.somewebsite.com/picture.jpg"/&gt;
</body>
</html>

With the following manifest :

CACHE MANIFEST
#v0.1

NETWORK:
http://www.somewebsite.com/

This work fine, the picture is displayed.

My problem is that I won't be able to know from where the picture will come. Here comes the online whitelist wildcard flag, that is supposed to solve my problem.

But with the manifest :

CACHE MANIFEST
#v0.1

NETWORK:
*

The image is not displayed (tested on safari / safari mobile / firefox).

What is not working ?

Is there another way to turn the online whitelist wildcard flag on ?

+1  A: 

Per the docs, when "the online whitelist wildcard flag is open" (i.e., the NETWORK: * format),

Subresources, such as style sheets, images, etc, would only be cached using the regular HTTP caching semantics, however.

which seems to be the "what is not working". To cache subresources in the HTML5 way, the manifest must either list them in a CACHE: section, or use specific "online whitelist namespaces" as you did in your first version.

Alex Martelli
+1  A: 

Tested in Firefox 3.6.4:

NETWORK:
http://*
dalibor
A: 

I wish to use an svg font in a webapp aimed for mobile safari (mobile safari only reads the svg font format for @font-face) Mobile safari also requires the font-ID, which is included at the end of the file name, but included after number sign (#):

font-name.svg#123456789

This is not working in the cache-manifest for the site and, with the limited feedback one gets from mobile safari, I am only guessing that the # is causing the font-id to be read as a comment, and not part of the actual file name.

Is there a way to 'trick' the cache manifest into reading this differently? Perhaps with a wildcard after the SVG? Or an ascii-only trick?

Gerry Straathof