Load time optimization of JavaScript web applications

Detta är en Kandidat-uppsats från Blekinge Tekniska Högskola/Institutionen för programvaruteknik

Författare: Simon Huang; [2019]

Nyckelord: ;

Sammanfattning: Background. Websites are getting larger in size each year, the median size increased from 1479.6 kilobytes to 1699.0 kilobytes on the desktop and 1334.3 kilobytes to 1524.1 kilobytes on the mobile. There are several methods that can be used to decrease the size. In my experiment I use the methods tree shaking, code splitting, gzip, bundling, and minification. Objectives. I will investigate how using the methods separately affect the loading time and con- duct a survey targeted at participants that works as JavaScript developers in the field. Methods. I have used Vue for creating a website and ran Lighthouse tests against the website. All this within two Docker containers to make the reproducibility easier. Interviews with JavaScript developers were made to find out if they use these methods in their work. Results. The best result would be to use all of the methods; gzip, minification, tree shaking, code splitting, and bundling in a combination. If gzip is the only option available for the developer to use, we can see around 60% decrease in loading time. The inter- views showed that most developers did not use or did not know of tree shaking and code splitting. Some frameworks have these methods built in to work automatically, therefor the developers does not know that it is being utilized. Conclusions. Since tree shaking and code splitting are two relatively new techniques, there is not much scientific measured values available. From the results, we can give the conclusion that using all of the mentioned methods will give the best result in loading time. All of the methods will affect the loading time, and only using gzip will affect it with a 60% decrease.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)