Data URIs
Publikováno: 18.8.2019
We’re all familiar with traditional URI protocols like https, http, ftp, and file, but data URIs have become a large part of our online strategy. We can use them to display images, the Mac camera and webcams, and more. But what if we simply want to use a data URI to convey basic data? Typing […]
The post Data URIs appeared first on David Walsh Blog.
We’re all familiar with traditional URI protocols like https, http, ftp, and file, but data URIs have become a large part of our online strategy. We can use them to display images, the Mac camera and webcams, and more. But what if we simply want to use a data URI to convey basic data?
Typing a data URI shouldn’t be difficult, and it isn’t. As someone that works on the Firefox DevTools Debugger, I’m often typing out data URIs to illustrate problems. The format is:
data:text/html,<body class="blah"></body>
We’re all so ingrained to use protocol://subdomain.domain.tld
addresses that data URIs look foreign…but they require the least amount of resources to express content!
The post Data URIs appeared first on David Walsh Blog.