Minification
Minification is the process of reducing the size of a file to improve the website’s performance. This process removes unnecessary files or data, such as code comments, white space, unused codes, and shortening variable and function names. This ensures the website’s functionality. The following paragraph explains some of the measures taken
Removing whitespace means removing tabs, line breaks, and spaces, including spaces between elements, around operators, and within lines of code. The comments are also eliminated as they function as explaining the codes and are not useful in executing the functions.
Developers replace longer names with shorter ones, especially to reduce the code and obscure its purpose. Dead codes are also eliminated as they are no longer needed and unreachable during execution.
Certain coding patterns are also optimised into shorter forms. For example, conditional statements or loop structures can be condensed. HTTP requests can be reduced by combining several files into a single file.