What is a Data URL?
4 November 2022 (Updated 4 November 2022)
In a nutshell
A Data URL is a URL prefixed with the data:
schema that lets you embed small files inline. It has the following syntax:
mediatype
: A MIME type (e.g.,image/png
). Defaults totext/plain;charset-US-ASCII
base64-token
: Needed for non-textual datadata
: The base64 encoded string
Reserved characters, spaces, newline characters, and other non-printing characters must be percent-encoded.
Examples
Plain text
Base 64 encoded version of text
HTML document
Sources
Tagged:
HTTP
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment