W3C home > Mailing lists > Public > www-talk@w3.org > July to August 1995

bad-idea-of-the-day: Inline data as URL scheme?

From: Larry Masinter <masinter@parc.xerox.com>
Date: Wed, 30 Aug 1995 12:01:34 PDT
To: www-talk@w3.org
Message-Id: <95Aug30.120135pdt.2763@golden.parc.xerox.com>
I've noted from time to time (and been asked to help with more
locally) a request to embed some other (small) media type inline.
I was looking for a way that this would work for VRML and PDF as well
as HTML.

I've been thinking that this might be a new kind of URL scheme. It is
most like 'immediate addressing', i.e., you actually stick the value
into the address field. What kind of data? Well, perhaps any MIME
type, suitably encoded. For example:

data:<mimetype>,<encoding>,<encoded-value>

where <mimetime> is a media type (with optional parameters, etc.),
<encoding> is either Q (for 'quoted-printable') or 'B' for 'base64'
(with possibly other encodings defined), and <encoded-value> is the
data to be recreated as an 'immediate' value.

This is only to be used for very short data types. For example,


      data:text/plain,Q,A_brief_footnote.

might be useful in a footnote link, while,

<IMG
SRC="data:image/gif,B,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7"
ALT=Larry>

could be used for a small inline image.

The application that I really wanted to use this for is one where
we've designed a custom 'helper' application which invokes some other
process with more information than just 'the URL', e.g.,

 data:application/x-local-database,Q,database-name,argument1,argument2

This is only appropriate for delivery of very small inline data. The
embedded image above is probably near the limit of utility. For
anything else larger, or where the base64 encoding is problematic or
cumbersome, you're better off sending multipart/related with the first
part being the data containing the references (e.g., a HTML or PDF
file) and the subsequent parts being the actual data, all linked by
cid: URLs in the first part and content-ID headers in the subsequent
parts.
Received on Wednesday, 30 August 1995 15:04:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:18 GMT