Why base64Encode images in CSS?

Possible duplicate:
embedding background image data in css as base64, good or bad practice

I just looked at the source on my Google Chrome homepage and noticed that the images are base64 encoded in CSS. What is the advantage of this? I am tempted to think that this is just to shorten HTTP requests, but since it is a local application, it does not matter, anyway? Can it just upload the image locally?

menu > [checked]:before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAARklEQVQYlWNgwA+MgViQkIJ3QKzEAFVpjEPBf5giJaiAMRYF72DWKSEJlKMpgNsgiCTxH5sCbG7AqgBZ4V2sCv7//08QAwAUfjKKBs+BFgAAAABJRU5ErkJggg==");
  display: inline-block;
  height: 9px;
  margin: 0 5px;
  vertical-align: 50%;
  width: 9px;
}
+5
source share
2 answers

its a Data Uri Scheme , and as far as I know, the only advantage is the saving of HTTP requests (since everything is loaded as one, not a selection of images).

google chrome.... , google .

+2

, , ...

base64 Data Uri, . base64, :

?PNG

IHDR           ??FIDAT?c`???X???w@??Ui?C??"%??1?`?)!    ??)?? ?$??ln??Y?]?
???O~2?ρIEND?B`?

, ", css .

base64, , :

0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+,=

, , , .

+1

All Articles