Hacker News new | ask | show | jobs
by jarin 5580 days ago
I would say a big disadvantage of doing it this way is you're serving up different CSS/JS files for each page. The approach in the article lets you separate your CSS out into files based on general "concerns" that make sense to your developers, while being able to use an asset packaging tool like Jammit (or even mod_pagespeed) to package them into one large CSS file that can then be cached by the browser, ISP proxies, and your CDN sitewide.
1 comments

I would say a big disadvantage of doing it this way is you're serving up different CSS/JS files for each page.

You don't have to, though. You can put everything into a single global css file, and be done with it.

And I haven't implemented it, but I can immediately see easy ways to package it all up into single files that can be easily cached.

It's easier to consolidate the files programmatically after they've been logically separated, than to logically separate out of a monolithic location.