Critical CSS can also be placed inline and the same goes for CSS needed for one page. There is no need to put this in a CSS file. That code must then also be loaded on every other page. Any unnecessary code in a CSS file should be removed. Tip 5: Optimize JavaScript files What applies to CSS files also applies to JavaScript files. JavaScript has become an increasingly important part of a web page over the years and this is also loaded using a JavaScript file. JavaScript files can be large and therefore pose a problem if they are not loaded properly. Again, there is critical JavaScript and non-critical JavaScript.
The most important thing to know before optimizing is what each JavaScript file on your website does. JavaScript files can be provided with an sync and defer tag. A sync things Singapore phone number list to ensures that these files are loaded asynchronously, the browser can download multiple JavaScript files at once and process them 1-by-1. Defer ensures that the JavaScript file is downloaded, but not processed until the very end, has already loaded. Sync & Defer Attribute So when you know what your JavaScript file does, you can start optimizing it and provide each file with an async or defer tag.
Additional Tip! In WebPageTest you can see under the waterfall with which external domains a connection is made, for example for external scripts. Before a file from an external domain can be downloaded, the browser must first know where the server of this external domain is located and a connection must be made with the server. The browser only does this once the external domain is in the code. By adding a <reconnect> in the <head> of the page with important external domains, the browser already looks up where the server is located and a connection is made, so that this no longer has to be done when an external file has to be loaded. become.