Why use data URI scheme?

Viewed 21269

Basically the question is in the title.

Many people have had the question stackoverflow of how to create a data URI and problems therein.

My question is why use data URI?

What are the advantages to doing:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />

Over doing:

<img src="dot.png" alt="Red dot" />

I understand one has less overhead on the server side (maybe), but what are the real advantages/disadvantages to using data URI?

5 Answers
Related