library for parsing data URIs?

Skip to first unread message

Rick Byers

Dec 28, 2011, 1:59:20 PM12/28/11
If web intents are going to encourage the use of data URIs for passing data by value encoded in a URL, then I think we need to supply a standard library for parsing these URIs.  It looks like all the samples today just store the received URI as the src of an img element.  Real-world scenarios will often require manipulating the data directly in JavaScript.

I had hoped that XmlHttpRequest would be able to handle both http: and data: cases for me transparently, but XHR intentionally doesn't support data: URIs (see thread on this here:  Naive parsing is easy, but fully supporting all cases is more complicated.  See, for example

Reply all
Reply to author
0 new messages