📜 ⬆️ ⬇️

Pictures in the body of the page using data: URL

Note: below is the translation of the article “Inline Images with Data URLs” , which deals with the issue of embedding images on web pages using data:URI . This scheme allows you to insert the code of images directly into (X) HTML-page without accessing external files, which reduces the total number of HTTP requests to the server. My comments further in italics.

Inline images use a data:URI to embed directly into the body of a web page. As defined in RFC 2397, such URIs are intended to insert small objects as “immediate” data. Such objects should be treated the same as any other external files. Using embedded images allows you to save HTTP requests to external resources.

Browser support data: URL


')
Although Opera 7.2+, Firefox, Safari, Netscape, and Mozilla support data:URI , Internet Explorer 5–7 is not at all. However, it is reported that Internet Explorer 8 will support this scheme, as it takes Acid2 test , which allows using data:URL as a real alternative for the introduction of small decorative images. There are also several tricks to support older versions of Internet Explorer.

read further on webo.in →

Source: https://habr.com/ru/post/31500/


All Articles