While constant monitoring and optimizing of the code is always a good idea, there is also a process called “Minification” to do so. During a project for a university course I had to use the service minifier.org to reduce the file size of my js- and css-files. It reduces unnecessary text, like comments or whitespaces from those files and even optimizes Javascript code according to common programming optimization patterns.