Skip to content

Comment on Reverse-Engineering Xkcd's 'Frequency'

Comments

To me the most interesting thing in this article were the urls of the inlined images, <img src="data:image/png;base64,...> I had no idea you could do that.

You can actually use it for all sorts of things. (eg embedded fonts)

https://en.wikipedia.org/wiki/Data_URI_scheme

IE 7 doesn't support it, and IE 8 limits you to 32 KB data uri's. IE also only supports images, stylesheets and javascript, while other browsers let you be a bit more creative with things like generating pdf's and excel files client-side.

That technique is really useful when serving a site via web sockets.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.