 |
Monday, July 18, 2005 |
In tracking down the documentation on Firefox's about: URI scheme (aka URL scheme), I came across the amazing data: scheme, which is an IETF standard. The data:
scheme basically enables you to encode any element of an HTML page, or
even the an entire HTML page itself, into a URI. In other words, data:
enables you to directly embed a resource into web page, instead of
linking to it. (Technically, the resource is embedded in the URI, but
since the URI is embedded in the web page, it is for most purposes, the
same thing.) Here is an example of a mini web site encoded in a URI. Look at the status bar of your browser to get a hint of what it looks like.
This hack reminds me of the javascript: scheme (aka javascript: protocol) which enables the very useful bookmarklet hacks. However, unlike data:, the javascript:
scheme is not standard. One drawback is the limit on URI length, which
appears to be about 4000 characters. The Wikipedia entry for data: links to some useful resources including the kitchen, which is how I created my demo encoded/embedded web page.
11:18:54 AM
|
|
© Copyright 2006 Nicholas Gall.
|
|
 |
 |
 |
 |
| July 2005 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
|
|
|
|
1 |
2 |
| 3 |
4 |
5 |
6 |
7 |
8 |
9 |
| 10 |
11 |
12 |
13 |
14 |
15 |
16 |
| 17 |
18 |
19 |
20 |
21 |
22 |
23 |
| 24 |
25 |
26 |
27 |
28 |
29 |
30 |
| 31 |
|
|
|
|
|
|
| Apr Sep |
|
 |
 |
 |
 |
|