Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much Javascript is too much?

I am building a SAAS web application and as soon as I include jQuery and jQuery UI the javascript is already 300kb. Add my own and a few bits and minified it is still 400kb. What are you limits on Javascript and what do you do to make sure the performance is still good?

like image 479
Craig Avatar asked Dec 04 '22 10:12

Craig


1 Answers

gmail is over 2 megabytes of mixed resources (scripts, images, etc) after it fully loads. I think that should give you an indication.

Other than the specific question you asked, there are many best practices you can follow to cut down on loading times. Minify your scripts, gzip-encode everything (even dynamic content if server resources allow for it), meticulously compress your images, etc. As Corey said, use YSlow or the Chrome profiler.

like image 181
thejohndonson Avatar answered Dec 22 '22 02:12

thejohndonson