📜 ⬆️ ⬇️

Data URI of the image instead of sprites in Ruby on Rails

dataURI-image

To whom?


Not lit



Optimization of a web application (page, resource, portal - further, for brevity, simply - an application) directly depends on the number of requests to the server. There is a wonderful presentation on this topic. As an optimization (reducing the number of requests to the server), sprites with images are applied, i.e. a group of images combined into one - and after the forces of css only its individual parts are shown. This in turn adds a lot of effort to the developer - in the event that the developer has never used sprites, but is only going to transfer his brainchild to them. In any case, the images that fit into the sprites are unlikely to ever be changed - unless, of course, the design of the application is altered altogether, i.e. Do not change the main CSS file of the application. But - why do we need a separate file with images, if you can use the data URI?

So strategy



')

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


All Articles