This is a demonstration of data URI creation in javascript. Support for data URIs varies across browsers, and will also depend on the length of the URI in question.

This project is primarily educational: in any other common language there are already libraries for constructing most any type of file. Precisely because it's kind of silly to do it in javascript, libraries do not always exist here. This project is a place to learn how things work at a fairly low level, without it being too obvious that it's just wheel-reinvention.

Source code is here.