[whatwg] Clarifying the use and requirements of Data URL

Peter Beverloo peter at lvp-media.com
Wed Aug 18 06:21:00 PDT 2010


Currently the specification requires the use of Data URLs for
canvas.toDataURL[1] and refers to usage of them a number of times as
well[2][3].  While steps describing how to generate a Data URL are
defined in the specification[4], they are not being referenced by the
other occurrences.  These steps seem to be identical to the contents
of RFC 2397[5], "The "data" URL scheme" by Larry Masinter.

Next to that, the specification does not list when Data URLs should be
supported by an User Agent. WebKit, Gecko and Presto seem to accept
them as any resource, including locations entered via the address bar,
while Trident only accepts Data URLs for images and scripts.

I believe the use and requirements of Data URLs in the specification
could be clarified by:
  - Referring to RFC 2397 for information about their composition and
syntax *or* generalize the steps described in the form submission
algorithm[4], so they can be applied on the entire document.
  - Extend the accepted values of @src, @href, @action et al to
include support for data: URLs.

Thank you,
Peter Beverloo

[1] http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl
[2] http://www.whatwg.org/specs/web-apps/current-work/#submit-data-post
[3] http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin
[4] http://www.whatwg.org/specs/web-apps/current-work/#submit-data-put
[5] http://tools.ietf.org/html/rfc2397



More information about the whatwg mailing list