Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concat/minify CSS and JS files #51

Open
bencentra opened this issue Feb 25, 2015 · 3 comments
Open

Concat/minify CSS and JS files #51

bencentra opened this issue Feb 25, 2015 · 3 comments

Comments

@bencentra
Copy link
Member

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.

@bencentra
Copy link
Member Author

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.

@gambogi
Copy link
Member

gambogi commented Mar 10, 2015

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

@ryansb
Copy link
Member

ryansb commented Mar 11, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants