4 ms·
I think a lot of the suggestions the parent comment suggests are orders of magnitude better savings than writing things by hand... Perhaps writing things by ha
by vore 5y ago
I think a lot of the suggestions the parent comment suggests are orders of magnitude better savings than writing things by hand...
Perhaps writing things by hand has a questionable nostalgic allure of "keeping one honest" but beyond that I don't think it's super practical.
- Nextgrid 5y agoWhile true in theory, I believe that keeping things handmade means that the payload couldn't realistically become big enough for the parent's suggested optimizations to actually matter. An unoptimized payload isn't that big of a deal if it's still smaller than the best optimized one.
- vore 5y agoPerhaps not all of the advice applies, but when it comes to images and fonts, I don't think any amount of keeping things handmade is going to outstrip the advice regarding static caching and loading fewer fonts.
- bachmeier 5y agoThe best advice for images is to delete them. There's a widespread belief that meaningless pictures at the top of a post are critical. Here's the first link that comes up on Medium: https://equinox-launch.medium.com/trade-hard-win-big-dopewarz-has-landed-3240e4705b97 https://equinox-launch.medium.com/trade-hard-win-big-dopewar... The value added of that image at the top is negative. This is, sadly, the rule rather than the exception. Edit: This is an even better example: https://medium.com/general_knowledge/top-10-crypto-gaming-projects-bonus-612249019a5e https://medium.com/general_knowledge/top-10-crypto-gaming-pr... How anyone can look at that image and say "that'd be perfect for the top of my next post" is beyond me.
- notreallyserio 5y agoAt least the Medium gif-every-paragraph plague seems to have ended. Not sure why anyone thought it was necessary.
- Nextgrid 5y agoHeavy images & fonts on an otherwise plain HTML page will still be acceptable as they would be loading in parallel - in most cases the text will come first anyway. I'd rather have a half-loaded page with images/fonts missing than a JS-based page which won't give me anything until the full JS payload is downloaded & executed.
- pwdisswordfish9 5y agoWriting HTML by hand is pretty dubious advice (slightly impractical but doable, so not necessarily something to rule out on those grounds, but the factor that dominates in deciding whether or not to do it comes down negligible benefit). But writing CSS and JS by hand is both way more practical than people think, and the gains are real.
- unclebucknasty 5y agoIf you're not a fan of hand rolled HTML, then what do you think of JSX?
- jen729w 5y agoIf HTML allowed you to trivially import reuseable components like you can with JSX it’d be killer. That’s the one thing that stops me writing my site by hand. I’m looking at Astro for my site’s re-write as it seems to find a happy medium here.
- unclebucknasty 5y ago>If HTML allowed you to trivially import reuseable components like you can with JSX Sounds like WebComponents. >I'm looking at Astro... Never heard of it and just gave it a quick glance. Hadn't heard of the "islands architecture" it implements either, although it is similar to some familiar concepts. In fact, it reminds me of the way we built sites years ago (pre-AJAX even), when static HTML was just delivered by the server and there was little-to-no JS involved, save for some effects. And, that's the funny thing: in spite of all the myriad paths and paradigms, we seem to be coming full circle. It's funny in 2021 to see a "new" project advocating for a "new" approach that is essentially "SSR static HTML with minimal client JS FTW!"
- jen729w 5y ago> Sounds like WebComponents. Interesting. I’ll check it out. Update: checked it out. Shame that `Getting Started` > `Web Components` = 404.
- mro_name 5y agoi don't. Write by hand and apply the above! But there won't be seconds to shave no more in the first place.