Flask Assets
Another bottleneck in web applications are the amount of HTTP requests required to download the CSS and JavaScript libraries for the page. The extra files can only be downloaded after HTML for the page has been loaded and parsed. To combat this, many modern browsers download many of these libraries at once, but there is a limit to how many simultaneous requests the browser makes.
Several things can be done on the server to reduce the amount of time spent downloading these files. The main technique that developers use is to concatenate all of the JavaScript libraries into one file and all of the CSS libraries into another while removing all of the whitespace and carriage returns from the resulting files. This reduces the overhead of multiple HTTP requests, and removing the unnecessary whitespace and carriage returns can reduce a file's size by up to 30 percent. Another technique is to tell the browser to cache the files locally with specialized HTTP headers, so the file is only...