RFC 2397 (rfc2397) - Page 2 of 5
The "data" URL scheme
Alternative Format: Original Text Document
RFC 2397 The "data" URL scheme August 1998
attribute value literal, the ATTSPLEN (2100) limits the sum of all
lengths of all attribute value specifications which appear in a tag,
and the TAGLEN (2100) limits the overall length of a tag.
The "data" URL scheme has no relative URL forms.
3. Syntax
dataurl := "data:" [ mediatype ] [ ";base64" ] "," data
mediatype := [ type "/" subtype ] *( ";" parameter )
data := *urlchar
parameter := attribute "=" value
where "urlchar" is imported from [RFC 2396], and "type", "subtype",
"attribute" and "value" are the corresponding tokens from [RFC 2045],
represented using URL escaped encoding of [RFC 2396] as necessary.
Attribute values in [RFC 2045] are allowed to be either represented as
tokens or as quoted strings. However, within a "data" URL, the
"quoted-string" representation would be awkward, since the quote mark
is itself not a valid urlchar. For this reason, parameter values
should use the URL Escaped encoding instead of quoted string if the
parameter values contain any "tspecial".
The ";base64" extension is distinguishable from a content-type
parameter by the fact that it doesn't have a following "=" sign.
4. Examples
A data URL might be used for arbitrary types of data. The URL
data:,A%20brief%20note
encodes the text/plain string "A brief note", which might be useful
in a footnote link.
The HTML fragment:
Masinter Standards Track