ComputerScienceHouse / CSHMembersPortal

Internal CSH Portal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Concat/minify CSS and JS files

bencentra opened this issue · comments

Now that all vendor and custom CSS and JS is included with the project, there's no reason not to concat and minify it all. This will reduce the number of requests made to load the page by ~7, and hopefully improve load time my some amount of milliseconds.

Add a Grunt task for concat-ing and minify-ing CSS and JS files.

Not sure if I want to merge the changes yet, but here's the work: https://github.com/bencentra/CSHMembersPortal/tree/minify

Concat-ing/minify-ing the css and js drops the request count by 6 and the total request size by 19KB. It has no obvious impact on page load speed; it's just slow because of Angular.

If we're truly concerned about performance, we should switch to some other templating option, probably server side. This will probably speed up rendering and let us cut out angular.min.js, saving a few more KB. Maybe I'll whip up a quick and dirty PHP version to compare against.

Honestly we should probably be moving to server side templating as you mentioned. Angular is really overkill for this list of links.

So it doesn't seem like there's anything dynamic except the "contact us" form, so why not just statically generate the site from templates once, instead of on every request?