data: URI scheme

Earlier today I added some DATA URIs to a blog entry I was putting together. I was in a situation in which I couldn't host the images anywhere, and they were under 250 bytes each, so I couldn't reference them via HTTP, and nor would I want all the HTTP overhead for these small images.

It had been awhile since I'd used DATA, so I tested on Firefox, Safari, then IE7. Firefox, check... Safari, check... IE7, nope!? I assumed I'd screwed something up because not supporting data: URIs made no sense at all. Sure enough, IE7 doesn't support the scheme. It's beyond me as to why. I'd put DATA into Netscape/Mozilla/Firefox long ago, so I was sad to see the lack of support in IE. What makes it particularly funny is that in lieu of rendering the image data itself, IE lays out a generic box with the text "embedded image" in it. Instead of telling me it's an embedded image, maybe just render the data instead!

Jud Valeski

Jud Valeski

Parent, photographer, mountain biker, runner, investor, wagyu & sushi eater, and a Boulderite. Full bio here: https://valeski.org/jud-valeski-bio
Boulder, CO