There is always a point in minimizing, combining and gzipping your assets to facilitate server loading.
- Minification is the action you refer to, removing unnecessary spaces and comments to reduce download speed.
- The combination is likely to show an even greater increase in page rendering speed; this is the act of combining all your javascript files into one and all your css files into one (this can also be done for most images, but this requires another work). This is done to reduce the number of requests that the browser must make on your server in order to display the page.
- GZipping is the action of further compressing the compressed data in browsers that indicate that they will accept such data. This further reduces size, but adds some extra workload from both ends. You are likely to see a net profit from it.
Depending on the environment in which you work, there are different components that will help you with this, which usually covers all of the above at a time.
The time that your code takes to load from the server directly affects the time the page takes to render. JavaScript blocks, which means the JS block will prevent any visualization of the future until the block completes. Thus, when you place javascript files (i.e., at what point in the rendering process they will be requested), how many requests that are required to fully load it, and how much data to load, will have an effect on the download page, as it appears to the user.
As soon as the browser analyzes your code, whether it be javascript, css or html, it will create internal representations of the part that it needs to remember, and the actual formatting will no longer affect it.
David Hedlund
source share