Base64, which can be identified as one of the data URI scheme types.
There are several types of Data URI scheme that can be identified, as follows:
Data:, Text
Data:text/plain, Text data
data:text/html,html Code
DATA:TEXT/HTML;BASE64,BASE64 encoded HTML code
DATA:TEXT/CSS,CSS Code
Data:text/css;base64,base64 coded CSS Code
Data:text/javascript,javascript Code
DATA:TEXT/JAVASCRIPT;BASE64,BASE64 encoded JavaScript code
DATA:IMAGE/GIF;BASE64,BASE64 encoded GIF image data
DATA:IMAGE/PNG;BASE64,BASE64 encoded PNG image data
DATA:IMAGE/JPEG;BASE64,BASE64 encoded JPEG image data
DATA:IMAGE/X-ICON;BASE64,BASE64 encoded icon image data
Picture +base64 is a way to quickly load pictures, and it saves a lot of bytes from the back end.
However, IE6 and IE7 do not support this approach.
The wording is as follows:
XADFASDFASDFASDX let this heap represent a picture of the Base64 encoding.
This thing is actually very old. Today I came up with a compatibility issue and decided to make it clear. But I found several ways, all related to MHTML.
1<!--
2content-type:multipart/related; boundary= "=_data-uri"
3 -
4<!DOCTYPE HTML>
5 <HTML>
6<Head>
7<styletype= "Text/css">
8 #pic{
9width:670px;Height:710px;
TenBackground-image:expression ("url (mhtml:" + window.location + "!locoloco)");
One}
A</style>
-</Head>
-<Body>
the
- <DivID= "Pic" ></Div>
-<DivID=teststyle= "Display:none;">
-
+--=_data-uri
-Content-location:locoloco
+Content-transfer-encoding:base64
A
atIVBORW0KGGOAAAANSUHEUGAAAAUAAAAFCAYAAACNBYBLAAAAHELEQVQI12P4//8/ w38giaxdibke0dhxgljnbaao9txl0y4ohwaaaabjru5erkjggg==
---=_data-uri--
-
- </Div>
-</Body>
-</HTML>View Code
This is a very hack way, do not recommend this, there is the asynchronous request back data, so feel very bad play.
If not compatible, you can only think of other methods.
Because to make the picture is a two-dimensional code, so re-agreed interface, by JS directly generated two-dimensional code. So other problems arise. JS generate two-dimensional code components to one.
And then it's done.
Base64 and Pictures ~