W3C home > Mailing lists > Public > www-font@w3.org > April to June 2010

Polling for and retrieving updated fonts through HTTP

From: Etan Wexler <ewexler@stickdog.com>
Date: Sun, 9 May 2010 22:10:23 -0400
Message-ID: <q2oae32ec321005091910ndef194e4ka0c8f63d25ccaf83@mail.gmail.com>
To: www-font@w3.org
> I wonder about how update notification might work for web fonts; when
> a new version of a WOFF font comes out, web authors might like their
> tools to notify them, and an "updates URL" in the <metadata> that can
> be polled could be a way to do this.

As others have noted, the solution is generic HTTP and is not specific
to resources with WOFF representations. Consider:

GET /font/ HTTP/1.1
Host: fonts.example.

HTTP/1.1 307 Temporary Redirection
Date: Sat, 08 May 2010 10:00:00 GMT
Retry-After: Sat, 08 May 2010 11:00:00 GMT
Location: http://fonts.example./font/4BDD3100
Content-Length: 37
Content-Type: text/uri-list

http://fonts.example./font/4BDD3100

GET /font/4BDD3100 HTTP/1.1
Host: fonts.example.

HTTP/1.1 200 OK
Date: Sat, 08 May 2010 10:00:01 GMT
Transfer-Encoding: chunked
Content-Type: example/otf+sfnt

4
OTTO
[...]

Later:

HEAD /font/ HTTP/1.1
Host: fonts.example.

HTTP/1.1 307 Temporary Redirection
Date: Sat, 08 May 2010 11:11:11 GMT
Retry-After: Sat, 08 May 2010 12:00:00 GMT
Location: http://fonts.example./font/4BDD3100
Content-Length: 37
Content-Type: text/uri-list

Later:

HEAD /font/ HTTP/1.1
Host: fonts.example.

HTTP/1.1 307 Temporary Redirection
Date: Sat, 08 May 2010 12:34:56 GMT
Retry-After: Sat, 08 May 2010 22:22:22 GMT
Location: http://fonts.example./font/
Content-Length: 37
Content-Type: text/uri-list

GET /font/4BE54430 HTTP/1.1
Host: fonts.example.

HTTP/1.1 200 OK
Date: Sat, 08 May 2010 12:34:57 GMT
Transfer-Encoding: chunked
Content-Type: example/otf+sfnt

4
OTTO
[...]

It’s also possible to implement the HTTP service so that the “latest
version” resource (http://fonts.example./font/ in the foregoing
examples), instead of redirecting to a version that happens to be the
latest at the time of processing of a request, always has a
representation that is the latest version. In that case, the service
should respond with appropriate “ETag” and “Last-Modified” header
fields and the user agent should check for updates by sending one or
both of header fields “If-None-Match” and “If-Modified-Since”, as
appropriate.

-- 
Don’t include my address as a recipient in public replies. I’ll read
public replies on the list.
Received on Monday, 10 May 2010 02:10:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:34 UTC