What is the best way to serve small still images?

Now I encode them in base 64 and using the uris of the data. The idea was that this would somehow reduce the number of requests the browser should make. Does this bucket contain water?

What is the best way to serve images in general? DB, from FS, S3?

I'm most interested in answers based on python and java, but everyone is welcome!

+3
source share
4 answers

I would definitely take a look at CSS Image Sprites, decent entries here and.

, , , CSS. HTTP- ( ) , CSS .

, , , - , .

+13

. , URI css, , IE6/7:

CSSEmbed MHTML IE6 IE7 , URI .

+3

64 uris . , - , . ?

: IE < 8; , 33%; .

, - , , CSS, @Nick, .

+2

Data URLs will certainly reduce the number of requests to the server, since the browser does not need to request pixels in a separate request. But they are not supported in all browsers. You will have to make a compromise.

+1
source

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


All Articles