Empirical study on effects of script minification and HTTP compression for traffic reduction

Yasutaka Sakamoto, Shinsuke Matsumoto, Seiki Tokunaga, Sachio Saiki, Masahide Nakamura · 2015

Code-on-demand is an architectural style that a client dynamically downloads a raw script file and executes it on the client-side. This style causes a problem of network traffic because a raw script is not always compiled or minified in advance. Formatting rules, such as indents, line breaks and comments for ensuring human readability, are not necessary to the execution. In order to save wasteful data transfer, it is necessary to minify or optimize the script on the entirety of the Web. In this paper, we explore the potential for JavaScript size reduction with focus on the two reduction approaches: script minification and HTTP compression. The main two research questions are: RQ1: How many percent of websites have reduction potential? RQ2: How much JavaScript size can be reduced on the Web? Our results show that about 40% of total size of JavaScript files used on the top 500 websites can be potentially reduced by a script minification. Moreover, the current JavaScript data traffic is saving over 50% by HTTP compression. If every website was configured to use HTTP compression, we can achieve a reduction rate of 5% to 20%.

Read the paper · More papers on PaperTik