![]() ![]() The characters permitted within the data part include ASCII upper and lowercase letters, digits, and many ASCII punctuation and special characters. The comma is required in a data URI, even when the data part has zero length. The data is a sequence of zero or more octets represented as characters. The data, separated from the preceding part by a comma ( ,).Since Base64 encoded data is approximately 33% larger than original data, it is recommended to use Base64 data URIs only if the server supports HTTP compression or embedded files are smaller than 1KB. The base64 extension is distinguished from any media type parameters by virtue of not having a =value component and by coming after any media type parameters. When present, this indicates that the data content of the URI is binary data, encoded in ASCII format using the Base64 scheme for binary-to-text encoding. An optional base64 extension base64, separated from the preceding part by a semicolon.If one is not specified, the media type of the data URI is assumed to be text/plain charset=US-ASCII. A common media type parameter is charset, specifying the character set of the media type, where the value is from the IANA list of character set names. The media type part may include one or more parameters, in the format attribute=value, separated by semicolons ( ). The syntax of data URIs is defined in Request for Comments (RFC) 2397, published in August 1998, and follows the URI scheme syntax. As of 2022, data URIs are fully supported by most major browsers, and partially supported in Internet Explorer. This technique allows normally separate elements such as images and style sheets to be fetched in a single Hypertext Transfer Protocol (HTTP) request, which may be more efficient than multiple HTTP requests, and used by several browser extensions to package images as well as other multimedia contents in a single HTML file for page saving. It is a form of file literal or here document. The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in Web pages as if they were external resources. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |