4 ms·
Can someone please give a few examples for what this could be used for?
by Liu 15y ago
Can someone please give a few examples for what this could be used for?
- dexen 15y agoWikipedia has some: http://en.wikipedia.org/wiki/Data_Uri#Examples http://en.wikipedia.org/wiki/Data_Uri#Examples
- sp332 15y agoIf you put data (usually little icons) in a data: URI, the browser can load the image without having to make another request to the server for the image, because the data is right there in the URL. It doesn't have to touch the network or disk. If you put that in an <image src=data://...> tag, it would be rendered inline just like a normal image. So that's the main advantage: the data is in the URI. It's usually used to reduce the number of requests made to the server for icon images.