Re:Best practices for JS and CSS organization
by plainOldText on Monday March 07, 2011 @02:28PM
(#2298323)
With so many css and js files you increase the number of requests to the server. It's not optimal.
[ Parent
| on HN ]
Re:Best practices for JS and CSS organization
by phlid909 on Monday March 07, 2011 @02:34PM
(#2298346)
That's why it's suggested you using Jammit (for Rails), or similar asset packager. Django has django-assetpackager. Or you can write your own pretty easily. Scoped selectors makes concatenating style-sheets safe.
Re:Best practices for JS and CSS organization
by sorghum on Monday March 07, 2011 @02:40PM
(#2298367)
If you have to sacrifice organization to gain performance, I think that's a sign you're doing something wrong. If number of requests is a concern, you should probably be doing asset packaging.
Re:Best practices for JS and CSS organization
by jpeterson on Monday March 07, 2011 @02:39PM
(#2298362)
This is pretty easy to solve after the fact by combining assets.