Note: below is the translation of the article “Serving JavaScript Fast” , written two years ago, but not at all lost its relevance.The author offers a large enough set of measures to speed up the loading and operation of CSS / JS-files.The references and partial translations of this article are widely cited in RuNet, however, it has not appeared completely anywhere, and there are quite a lot of useful tips in it.My comments further in italics.
The next generation of web applications will use very heavy JavaScript and CSS frameworks. We are going to demonstrate how to increase the speed of interaction of such applications and speed up their work.
All these so-called “Web 2.0” applications, their deep interaction with the page content and the user themselves greatly increased the difficulty of using CSS and JavaScript. In order to be sure of the small size of the applications, we need to optimize both the size and the very nature of all the files that are needed for the normal operation of our page. We need to be sure that we have achieved optimum user experience for the site. In practice, this means that we need to maximize the reduction of the page size and speed up its work, while preventing the loading of unnecessary resources that have not changed since the last access.