5 ms·
`rm bootstrap.css` look, a 100% reduction! And it led to a better website. `gzip goodfile.css` and there's an improvement several times more effective than eve
by destructionator 10y ago
`rm bootstrap.css` look, a 100% reduction! And it led to a better website.
`gzip goodfile.css` and there's an improvement several times more effective than even the best minifier. And it keeps your source code legible in the browser and doesn't require a slow/buggy asset pipeline to test changes.
Yes, yes, I know minify+gzip can save like an additional 1% over what gzip alone does. To me, that's just not worth the cost to the developer.
- cphoover 10y agoOne of the main points of css optimization is not transfer size, but the time it takes the css engine to parse through a css file, and figure out where to apply those changes to the DOM. I think that while the described "reminification" method may not make sense in practice (as other's have said running minification process multiple times will amplify minifier bugs), Optimizing CSS, removing unused rules, grouping similar rules, optimizing selectors etc... does make sense, regardless of reduction amount in comparison to compression.
- xtf 10y agoAnd then HTTP/2 helps more, because it does not open a new connection for each file.
- motoboi 10y agoAnd because the compression session is longer and has a bigger dictionary. And because the TCP window size is already maximized.
- destructionator 10y agoHTTP 1.1 also does not open a new connection for each file.
- SippinLean 10y ago>And it led to a better website. Where I had to write and test a modal by scratch? That's a loss of time and money for no benefit. >it keeps your source code legible That's what Sass sourcemaps and source-beautifying browser plugins are for >that's just not worth the cost to the developer It's part of my build, it costs me nothing.
- accountface 10y agoYou're sacrificing personal efficiency for bandwidth efficiency. You get to decide which is the best option for you and your users. I generally share the opinion that most people using bootstrap probably don't need to. I'd recommend questioning it at the start of every project instead of assuming it's what a project starts with.
- SippinLean 10y agoWhat? I'm using Bootstrap for personal and "bandwidth" efficiency. >most people using bootstrap probably don't need to Reflects poorly on those people then, not Bootstrap. >I'd recommend questioning it at the start of every project Of course, who wouldn't plan their project ahead of time? I mostly work on enterprise-level sites, every one has a modal, a dropdown, etc. I have yet to work on any site that didn't need a grid. The ones that don't need breadcrumbs? // @import "bootstrap/breadcrumbs"; ...aaand we're done.
- accountface 10y agoIn my anecdotal experience using bootstrap correctly with enduser efficiency in mind is the exception, not the rule. >Reflects poorly on those people then, not Bootstrap. Yes. >Of course, who wouldn't plan their project ahead of time? Again, in my experience: MANY people using bootstrap > The ones that don't need breadcrumbs? > // @import "bootstrap/breadcrumbs"; > ...aaand we're done. My comment was pointing out an inherent flaw to the popularity of bootstrap (which is no fault of their own): it's often used improperly and has lead to MASSIVE amounts of resources being wasted globally. My comment was made with the hope that someone who hadn't previously thought about WHY they are using bootstrap to think about it a little more at the start of their next project. You decided to respond by essentially fulfilling the stereotype of "condescending IT guy." I'm happy that you know how to use bootstrap as intended, and I apologize if my comment upset you... but I don't see the need to be a dick about it.
- SippinLean 10y ago