3 ms·
Sure, you could remove unused selectors, but then you'll end up with different CSS files for different pages. That's a lot of extra HTTP requests for a first-ti
by kijin 13y ago
Sure, you could remove unused selectors, but then you'll end up with different CSS files for different pages. That's a lot of extra HTTP requests for a first-time visitor who wants to look around your website.
Whether or not the extra HTTP requests are worth the time and RAM saved by removing unused selectors will probably depend on your specific needs and priorities. For the time being, though, I suspect that modern computers take less time parsing a few thousand unused CSS selectors than the time it takes to fetch an uncached HTTP resource from a few thousand miles away. Moreover, devices with less RAM and computing power tend to be connected to even slower networks (e.g. 3-year-old phone on a 3G network).