Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I saw a rant months ago about someone having a classmate that went in and properly formatted a compressed bootstrap file. Only to be told the properly formatted one already exists lol
-
@BambuSource Do believe so. Was trying to find it, but after several minutes of scrolling I had only reached October's rants I liked. 😂😂😬
-
You can just beautify it again - search for the plugin and also theres scripts that minify it for you before deploying it, webpack, cloudflare, ..
-
@HalfBloodPrince to save bandwidth and how much a browser has to load, its also common to bundle everything together via deploy scripts, so only one file gets loaded. (inline css, inline js, inline images ..)
-
Dacexi119977yThat's why you have your source code and then let webpack / Babel build it to a separate file for you.
-
aritzh7527y@JoshBent or you could use HTTP/2 and download everything in one request, even if they are in separate files.
-
I actually used a prettifyer before but it removed unknown attributes and stuff (like <div speed="5"> for my parallax) and @Dacexi yes I know there are more effective ways but I directly work with my final code.
-
@jhh2450 last week I used hover css in one of my webpage. My WD friend had told me to use min files so I picked the min version of the css which came to be compressed like this. I formatted the required portion only to find it already formatted in the normal version. :\
-
@sambhav2612 I've been there, too and I felt pretty dumb afterwards. Next level is your colleague editing the minified file and not telling you so that you overwrite his changes with automated minification.
-
aritzh7527y@Alkotronikk oh yeah, it will, but you wouldn't need to put all the CSS/JS/other in the same file. And I'd guess that you'd save more bamdwidth by using HTTP compression, rather than removing extra whitespaces. (Obviously, the best would be Compressed HTTP/2 with uglified files)
-
@BambuSource what you mean is something different, the thing mentioned only formats it, just like an IDE does, nothing else.
-
@aritzh iirc google will bitch at you for any external resources nowadays also, so packaging solves that too.
Theres a ton of reasons why to package, rather than not to, so I see no reason why one shouldn't.
Especially when one pays for bandwidth (ex. AWS) and will save a shit ton by just delivering less. -
@aritzh less - in the meaning of useless readability aid, since theres no need to have non minified code, since if somebody opens up the devtools he will anyway see a beautified version of the source.
-
aritzh7527y@JoshBent of course, I just meant that (just a guess) a user would load a website faster if the server used HTTP/2 and compression, instead of just minifying the files, or even joining them in one. However, the best would still be to apply all of them together, although you would lose from mantainability (unless the minifying is automated). And in the case that you pay for used bandwidth, then of course minifying would be better than HTTP/2. However, in general, I'd say that using HTTP compression would be even more effective in saving bandwidth.
-
@DefiniteGoose chrome has build in prettify 😎 morden just bundle could easily go over 10mb without compress
Related Rants
I'll never again compress my HTML, such a spagetti!
rant
html
🍝
fuck this shit