3 ms·
Modern front-end toolsets are finally starting to address this by using automated critical css, SSR + "hydrating" on load for interactive elements, webpack tree
by dmix 7y ago
Modern front-end toolsets are finally starting to address this by using automated critical css, SSR + "hydrating" on load for interactive elements, webpack treeshaking + chunking of assets into tiny js/css files and only loading code based on what the page/routes asks for, PurgeCSS to get rid of unused css, cssnano/uglify/htmlmin/imagemin, etc. Webpack and these various popular tools has done a lot to make the web better and are default in many starter kits. But we're just beginning to see it go mainstream.
The basic shift back to pre-rendering + delivering only what's needed on the actual page is a big deal which hasn't got enough attention yet IMO. We went completely in the other direction for over a decade because we thought networks and browsers could handle it, but it was too easy to abuse and mobile took over.
There's no reason even very advanced websites can't load quickly, without having to fully compromise back to the 90s non-interactive websites.
News sites and marketing teams still ruin it regardless with all the crap they add on top. But it's far far better than loading a giant blob of 20 jquery libraries plus a big old angular.js or backbonejs app (sometimes both at the same time) encompassing a whole site in one file, even though you just wanted to visit the contact page.
I also blame Themeforest type developers because they're still stuck in the "let's add a hundred JS files so I can parallax and animate two divs" mindset.
- wolco 7y agoA modern css framework would increase the font size change the font type make the reply link a fat button. It would put a card around each parent reply thread. Getting rid of unused css helps but the additional markup would make the page 4 or 5 times larger.
- scrollaway 7y agoA "framework" doesn't do that. A designer does. Or whoever decides to implement it.
- dmix 7y agoI see a trend away from that in 'trendy' CSS frameworks like http://tachyons.io/ http://tachyons.io/ and https://basscss.com https://basscss.com The Bootstrap stuff you seem bothered by is better for splashy big-headline marketing sites not high-density content like HN. A lof of web designers cut their teeth designing marketing websites, not app UIs, so it's not surprising when I see it mindlessly used on sites like Reddit's new redesign.
- liability 7y ago> news sites It's really a sad state of affairs when an industry with such a strong historical connection with publishing is now reasonably cited as an industry worse at publishing than most others.
- rangibaby 7y agoNewspapers have always been full of ads fwiw
- liability 7y agoI'm talking beyond the matter of ads. On their websites I can use an adblocker, so in that respect the situation has actually improved. They regularly fail on basic UX. Their ability to turn a kilobyte of text into 10MB of trash is astounding, as is their ability to cripple modern computer hardware, or simply readability, with their latest 'innovations' in totally unnecessary JS/CSS fuckery. uMatrix blocking all JS, including first party, helps. But you've still got bullshit like floating headers that follow you when you scroll down the article to contend with. I find myself creating cosmetic filters to remove pointless floating clutter on news websites more than any other sort of site. The industry seems utterly incapable of presenting a clean and readable article online.
- 18pfsmt 7y agoI would advise using your browser's developer tools to find the irritating web page js, css, or domain/sub-domain responsible, and then using uMatrix/privoxy/hostfile to block that garbage. Many sites are usable by preventing js entirely.
- jdnenej 7y agoReader mode on browsers is the easiest way to make news websites usable
- liability 7y agoI can often get the text of the article in Emacs, so I generally do that. My TTS integration is better in Emacs than Firefox anyway, so I actually prefer it for longer reading. But regardless of our personal work-arounds or workflows, those websites shouldn't be like that. The general public is still subjected to the default experience and that bothers me.
- jasonhansel 7y agoYeah, but those fixes and workarounds are only almost enough to sometimes compensate for the code bloat that the frameworks themselves have caused.
- dmix 7y agoPeople seem to be confusing web 2.0/bootstrap style design (see: Reddit's bad redesign) with the frameworks here but the component based approach combined with webpack/compilation steps, which are very much mainstreaming, are fundamentally different than top heavy JS frameworks I spent most of the last decade using. I dont think people have really seen what server-side rendering (ala Next.js/Nuxt.js), decoupled components, modern treeshaking, minification, and chunking can do for performance. We've yet to have a full web framework designed entirely to encompass this from day one but they're coming and getting better at it. Outside of the endless 3rd party crap the 'business' guys add, if anything, it's no longer the JS framework size and library cruft I'm worried about it's how many object watchers I've got at runtime via Vue.js and reactive style programming (which automatically adds Object.observe style watchers to all data) + component initializers (which can add overhead to simple HTML templates). Fortunately with the new Vue 3 function API there is a clear distinction between observed values vs static/immutable/config data. The amount of observers per page dropped dramatically. Otherwise looking at a Vue project in the performance tab shows it's highly async and efficient. The new Vue functional API (allegedly) is also going to be far easier to treeshake so you really only ever get the library features you're using. Even for something like Lodash or Ramda where you might use only 10% of the functions it's a big deal. I'm sure React is making similar progress in this direction and it was already smaller than Vue. CSS Frameworks have some ways to go and PurgeCSS isn't perfect but using a functional CSS framework like Tailwind or Tachyons also helps in this regard, so all of the stuff isn't intertwined and can be stripped out. This type of tooling really does massively improve the state of things automatically, even with poor coding practices or large applications spanning multiple pages. SSR, treeshaking, chunking, stripping unused CSS, etc is a 'zero cost' type optimization that I've seen turn 700-1000kb dev assets into loading 100kb base + a few 5-10kb js/CSS files dependent on the page.
- csande17 7y ago