这种显示图像的方法叫什么?

时间:2011-11-12 21:45:48

标签: html image

在Google图片上,部分图片的加载方式如下:

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBhQSEBQUEhQVFRQWFBQXFRYVFRQQFhIUFBQXFRYWFxQYHCYfGBkjGRcUHy8gIycpLCwsFR4xNTAqNSYrLCkBCQoKDgwOGg8PGi8kHyQyLCwsLCwtLiwsLC0sKSwsLCwsKSwsLCosLCwpLCwsLCksLCwsLCwsLCwsLCwsKSwsLP/AABEIAOQA2AMBIgACEQEDEQH/xAAcAAEAAgMBAQEAAAAAAAAAAAAABgcBBAUDCAL/xABEEAABAwEFAwgHBQYGAwEAAAABAAIDEQQFEiExBkFRBxMiYXGBkaEjMlJyscHRFCRCYpJzgqKywvAWM0Nj4fFTZMMV/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAQFAgMGAQf/xAA0EQACAgIABAQEAwcFAAAAAAAAAQIDBBEFEiExEyJBUQYyccGRsfAUI0JhoeHxJDNSYtH/2gAMAwEAAhEDEQA/ALxREQBYWVEdrNrnxSfZ7MA6YtxOc7NsQOlRvceCwnJRW2bqKJ3z5IdyW1RUtLtbeEMv+eXmtcOEEHqDaZKx9jtqftkXSbglb6zd3CoWuF8ZvROy+FXYsFNtNfyJEiLkXjexDiyPUanWh6gteXl1YtfiWPoV0IOb0jroFGY71laak16iB8l37FahI0OHeOBUXC4rRmPlh0fszOyiVfVmwiIrU0hERAEREAREQBERAEWKrh3nttY4H4JJm4t4aC8jtwg0XjaRjKSitt6O6i0brvuG0txQSNeN9DmO0ahbtV6eppraMoiIehERAEREBgqnNpbcYLztRcDVxaWn8pY2nz8FcirXlWuyj4ZwMnVjeevMt+YUbJW4b9i64JZGOTyS/iWvv9ivor8cLRzh4lT7k1tZktUjtxa4nd7IVZTspIrO5Hoa88/gA0d5J+Si1Lzo6njUYRxZSS9Eiy1FbQ6kj/ePxUqUbvyHDLX2hXv0P99arPiSpzx4yXo/zOIw2ufR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LX+L/sRjYm4ZLO17pQGufho2tS0NrqRlXPRSdZoimwgoR5Uc5ddK6bnLuzCLKLM1BERAEREAREQBERAFhZRAVxymAGVoI/AKdeZUIitTmeo4jvP1V6W+7Ipm4ZWNePzCtOw6juUbtPJnZHVLedZ7r6gdzgVFnS29ohX0Tk+aLKltk75D0jXuB8zmvOzQ4TXXqJNPIhWe/kli3TyjtbGf6Qsx8k8Q1nlPY2NvyKx8KZC/Y7W9/cgQlJAGVBSlBw4nUlTXk5Pp3U/wDGa/qbT5+C7Vk5ObIzUSP955p4NopFYrvjhbhiY1g4NFK9vFZQpae2S6cecZc0me6LKKUTwiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCwiIAiIh4FlEQ9CIiA//9k=

这叫什么?我想找到更多关于它的信息(例如,支持它的程度如何?它比传统图像更快吗?)。

3 个答案:

答案 0 :(得分:4)

这是Data URI schema中定义的RFC 2397

在这种特定情况下,图像是base64编码并嵌入页面/ css中。

执行此操作(Base64编码)会增加数据的大小(增加约30%),但数据URI会避免向服务器发出额外请求,这在很多情况下会导致整个页面加载速度更快。

答案 1 :(得分:1)

它被称为Base64 encoding,或编码Data URIs

它以与常规图像相同的速度处理,但它不需要额外的HTTP请求,因此导致更快的网页加载,但是(略微)更重的HTML / CSS文件。

答案 2 :(得分:0)

那是data URI scheme,请参阅RFC 2397