网页上有些图片的src或css背景图片的url后面跟了一大串字符,比如:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///+ZmZmOUEqyAAAAAnRSTlMA/1uRIrUAAAAJcEhZcwAACusAAArrAYKLDVoAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDkvMjAvMTIGkKG+AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAAB1JREFUCJljONjA8LiBoZyBwY6BQQZMAtlAkYMNAF1fBs/zPvcnAAAAAElFTkSuQmCC
那么这是什么呢?这是Data URI scheme。
Data URI scheme是在RFC2397中定义的,目的是将一些小的数据,直接嵌入到网页中,从而不用再从外部文件载入。比如上面那串字符,其实是一张小图片,将这些字符复制黏贴到火狐的地址栏中并转到,就能看到它了,一张1X36的白灰png图片。
在上面的Data URI中,data表示取得数据的协定名称,image/png 是数据类型名称,base64 是数据的编码方法,逗号后面就是这个image/png文件base64编码后的数据。
目前,Data URI scheme支持的类型有:
data:,文本数据
data:text/plain,文本数据
data:text/html,HTML代码
data:text/html;base64,base64编码的HTML代码
data:text/css,CSS代码
data:text/css;base64,base64编码的CSS代码
data:text/javascript,Javascript代码
data:text/javascript;base64,base64编码的Javascript代码
data:image/gif;base64,base64编码的gif图片数据
data:image/png;base64,base64编码的png图片数据
data:image/jpeg;base64,base64编码的jpeg图片数据
data:image/x-icon;base64,base64编码的icon图片数据
base64简单地说,它把一些 8-bit 数据翻译成标准 ASCII 字符,网上有很多免费的base64 编码和解码的工具
PHP中可以用函数base64_encode() 进行编码,如
echo base64_encode(file_get_contents(‘wg.png’));
目前,IE8、Firfox、Chrome、Opera浏览器都支持这种小文件嵌入。
举个图片的例子:
网页中一张图片可以这样显示:
<img src="https://www.yyytang.com/web/static/icon/logo.png" />
也可以这样显示:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAABBCAYAAADSdB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uh1WpFJwbivD19+rSgs9aXyZMnizprfSHOW7vdHnCcpJ3Dhw8jIyPDL7XzxIkT0dLSgh07dtDr5jgOLpcLDoeD3pNQUalUmD9/Po4fP46ysjIAwc0pwe5tfn4+Ojo6cPDgQWi1WqqtCx0xp1Kp8L3vfQ+VlZW4cuUKFAoFLBYLtFot25rPYPQRklMrWCwWxMTEUFMKcUwGEzxOpxNOpxMJCQmIiYlBT08PrFYrVCpVUGdmKH2S/jy/J0RZWRnsdjuefPLJgGMA3GaJuro6LFu2LKgpqaenBzt27EBWVha++93vBqxLrkdsrORaANA6FotF8N6R+0rus1hZIEwmEw4ePIjCwkLBnOJS762nmSbY70zG6HmNgdr1bI+MhzwPcp4tBmM4Muxy6RiNRjgcDtTV1WHmzJm47777ROuaTCZ0dnaivr4eY8eOFYw2IRDzRWdnJ1paWrBkyZKwtfC+xOl0YteuXfSkIjJ+AFi6dCkTmAzGEGTYCfxjx47RjTvB8kobjUa0trZCoVBg5syZAYUg2fjkcrmQnp4+KE66slgsOHv2LK5duwYAiI+Px9SpU8NyiDMYjIHLsBP4DAaDMVxhydMYDAZjmMAEPoPBYAwTmMBnMBiMYQIT+AwGgzFM+H+LKcEZFXfAFwAAAABJRU5ErkJggg==" />
把图像文件的内容直接写在了HTML 文件中,这样做的好处是,节省了一个HTTP 请求。坏处是浏览器不会缓存这种图像。
网友评论