In the last years, sites gradually become richer in functionality while demanding more network and device resources. Over the years, the experience shows that faster site engages 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 becomes even more important and can be the difference between a successful site and poorly performing one.
One way to make the site faster is to 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 embedding 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