In the last years, sites are gradually become richer in functionality while demanding more network and device resources. Over the years, the experience shows that faster site engage and retain users better than slower one. As Google announced that site speed is used as a factor in their web search ranking algorithm , Site speed become even more important and can be the difference between successful site and poorly performing one.
One way to make the site faster is consolidate HTTP requests. As the number of HTTP requests from the browser increases, the overhead and load time of the site increases. Thus, when we combine several HTTP requests when possible (For example, consolidate several CSS files to one file), we can dramatically decrease the load time of our web pages.
Let's see how Data URLs can improve the site speed.
Data URLs are special type URLs which allows to embed small files inline in documents(HTML or CSS files). Data URLs are prefixed with the data: scheme and have up to 3 parts.
|mediatype||The mediatype is a MIME type string. For example
|base64||Whether the encoding of the following
In the next part we will see some examples how to use those urls