Data URL format
Well, I never — never knew about Data URLs, that is. This is probably old news for a lot of people, but it’s something I missed; I have no idea when they came about. Data URLs lets you encode random data into URLs — essentially the URL is the data, rather than a link to it. Here’s an example:
If you follow that link in Opera or Firefox, you’ll get a “hello world” document. Obviously you can also do HTML:
data:text/html,<html><body><h1>hello world</h1></body></html>
And you can use Base64 encoding (this is the same as the previous HTML example):
data:text/html;base64,PGh0bWw+PGJvZHk+PGgxPmhlbGxvIHdvcmxkPC9oMT48L2JvZHk+PC9odG1sPg==
Clearly by using Base64, you can actually encode anything you like. Such as this example from Mozilla.org:
data:image/png;base64,... long Base64 bit here ...
Lots of fun! You can also save your HTML <CANVAS> tag drawings to this format, using toDataURL(). Now
I just have to think of some way to use this stuff. Note that (naturally) it doesn’t work in Internet Explorer.