Minification

Minification is the reduction of the size of stylesheet and script files by removing whitespace and comments and shortening variable names without changing functionality. Together with compression during transfer, it is one of the simplest measures for speeding up a website, and it is often available as a single setting in the content management system or on the server. Its benefit is limited, however – it saves tens of percent off the size of text files, but if the page loads large libraries and third-party scripts, minification alone will not solve the problem. A bigger effect comes from removing unused code, deferring the loading of non-essential scripts, and limiting the number of external services. After deploying minification, the website needs to be thoroughly tested, because incorrect processing of a script can break the functionality of forms.

See also: Core Web Vitals, Resource preloading, Cache and its configuration.