Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

221–230 of 283 posts

Re: The impact of removing jQuery on our web performance

#221
post #200

Earlier quoted context omitted.

In addition to which, jQuery was actual useful - React is just pure overhead with no real functionality.

I don’t understand how you can claim that react is pure overhead. Sure it does have overhead, but it’s also a really useful abstraction. How composable abstraction for UI components that enables local reasoning not functionality. jQuery is just pure overhead with no real functionality compared to vanilla js.

React is vastly overused. You don't need every single element in your page to be a separate component when 95% of your site is pure text and you have an occasional form or a button here and there.

If you're making an actual application (think Discord/Spotify) then yes, it becomes a necessary abstraction. Your personal website or news website (or many others) using React is a waste of my bandwidth and CPU cycles.

Re: The impact of removing jQuery on our web performance

#222
post #219
post #135

Earlier quoted context omitted.

It's not entirely surprising. Germany is a federal republic, somewhat similar to the US, with some degree of autonomy for its member states. Switzerland is a confederacy.

This needs correcting. Germany and Switzerland are both federal states, they occupy the same spot on the notional spectrum. https://upload.wikimedia.org/wikipedia/commons/d/da/The_path... > The comment would have a point if either state was unitary, but this is not the case. Switzerland was a confederation prior to 1848, the now inaccurate name stuck for I assume sentimental reasons. The issue of republics is orthogo…

My point is that they're both not the most centralised form of government. Even if Switzerland is officially a federation instead of the confederacy its name suggests, the point still stands.

Re: The impact of removing jQuery on our web performance

#223

jQuery is still wonderful.

Try new stuff every once in a while. You might be surprised

There's a JS library called New Stuff?

For me, I use Jquery because it works. Light and low impact. Syntax is good for readability.

Re: The impact of removing jQuery on our web performance

#224
post #154

The team at gov.uk is doing an excellent job regarding web performance, credit where credit is due. In many ways role model behavior. Still, the results are such a stretch as to not have that much meaning. They have to descent all the way to 2G to see any meaningful difference, and I'm assuming they are cold visits (typical in lab-based testing). For those exceptional users, this creates a difference from very poor (…

Governments have an obligation to serve all of their citizens, even those on 2G or similarly slow connections. They can't just say "eh, well, we don't want them as customers anyhow".

Re: The impact of removing jQuery on our web performance

#225
post #115

Earlier quoted context omitted.

I had the fun experience of my local (UK, major city) council sending debt collectors after me for non-payment of council tax while simultaneously (literally same week) asking what bank account to send the several thousand pounds they owed me for overpayment - because they failed to acknowledge that despite having moved address, I was still the same person, and their systems treated each address as an account not eac…

You pay council tax on your address, not on an individual basis. So if you moved house and didn't tell them, they quite reasonably would have counted the payments towards your old address, not your new one.

I did tell them, the person I told said I could keep my automatic payments going, which I did for a year before they said I hadn't paid a year on the new address and had overpaid a year on the old address.

They then denied knowing that I had moved address, but didn't have an answer to "then why have you sent me a letter (to my new address) saying the payments for the old address should be refunded if you think I still live there?" (they literally denied knowing I had moved after sending the letters).

I appreciate that involved human incompetence not just a poor IT system, but a better system would have made the updating of me as a person paying council tax from one address to another seamless, then it would have flagged the problem sooner than a year in, and then it could have crossed my "debt" with my "overpayment" rather than passing it (in what I assume was another human mistake, but again allowed by the system) to a debt collection agency.

Re: The impact of removing jQuery on our web performance

#226
I’m still a huge fan of jQuery. When I start a new web project then the first thing I do is add jQuery to the project. This is pretty much the only dependency that I ever use in my web projects. Nothing can beat the short “$” function and effects such as fadeIn, fadeOut, and others.

Re: The impact of removing jQuery on our web performance

#227
post #188
post #154

The team at gov.uk is doing an excellent job regarding web performance, credit where credit is due. In many ways role model behavior. Still, the results are such a stretch as to not have that much meaning. They have to descent all the way to 2G to see any meaningful difference, and I'm assuming they are cold visits (typical in lab-based testing). For those exceptional users, this creates a difference from very poor (…

12 seconds down to 9 seconds is not negligible. What is negligible is 12 down to 11.999 seconds because you prematurely optimized. And even for "normal" users, shaving milliseconds matter. The general idea is that a UI should respond within 100ms to feel instantaneous. More than 1s and you interrupt the flow of thought. According to Google research, increasing page load time from 1s to 3s increases bounce rate by 32%…

> Performance matters, a lot.

Developers really don't care. They will claim otherwise with great conviction, but its all posturing and bullshit. If developers did care they would measure everything and challenge popular assumptions. Instead most developers want to randomly guess at what works and instead talk about tools. That's why most pages will never come close to being vaguely fast. 9 seconds is still really slow.

My hamster mobile can achieve 0 to 60mph in under 8 seconds while a Corvette C8 takes about 2.6 seconds. Nobody gives a shit what socket wrench they used to put the tires on.

Re: The impact of removing jQuery on our web performance

#228

Earlier quoted context omitted.

jQuery is more convenient to use than vanilla JS. Vanilla JS is too verbose. If only jQuery was modular and didn't require to load 300 or 400 Kb of code. Also it is difficult to find non-jQuery library of a good quality. For example, I was looking for a small library to send and receive JSON via HTTP, and ended up writing my own wrapper around XMLHttpRequest (fetch() is a poor choice, it is not supported well in olde…

fetch() can definitely be aborted, and what "older browsers" don't support fetch? You must be talking maybe about Internet Explorer 11, the only older browser that is still somewhat used (in Japan and public/old infra) that doesn't support it? https://caniuse.com/fetch

From that page, it appears that older versions of Android Chrome don't support fetch at all.

I've seen stats that indicate that 5% of the U.S. population (to say nothing of other parts of the world) are still on Android Oreo (version 8), which wouldn't surprise me since older phones are basically locked in time.

Re: The impact of removing jQuery on our web performance

#229

Earlier quoted context omitted.

Exactly. It was cute for a few years, but these jQuery bashing thoughtpieces are so worn out now. As React and the long tail of frameworks slides into it's twilight years, it's clear in retrospect that jQuery was just a much more responsible and sound architecture (mostly because it cleaved to standards) than any of the things that spawned the 1000 "why I'm leaving jQuery for _this_" blogposts every day.

You can improve website performance by replacing jQuery with vanilla JS. That's a statement of fact, not a "jQuery bashing thoughtpiece". Several years ago, jQuery was practically a requirement, but now vanilla JS offers many of the same features. There's a huge amount of older websites that relied upon jQuery but don't really need it anymore.

Even as someone who's largely ripped out jQuery for vanilla JS I still totally understand why people use the API. Vanilla JS is terse comparative to jQuery short-hand syntax, especially for simple event bindings.

Sure, I think jQuery these days is largely legacy developer ergonomics... I admit there are parts of those ergonomics that I miss. Especially when comparing it to modern tool-heavy transpiled/compiled/whatever JS development which is way more opinionated than using a simple utility library.

Re: The impact of removing jQuery on our web performance

#230
post #200

Earlier quoted context omitted.

I don’t understand how you can claim that react is pure overhead. Sure it does have overhead, but it’s also a really useful abstraction. How composable abstraction for UI components that enables local reasoning not functionality. jQuery is just pure overhead with no real functionality compared to vanilla js.

React is vastly overused. You don't need every single element in your page to be a separate component when 95% of your site is pure text and you have an occasional form or a button here and there. If you're making an actual application (think Discord/Spotify) then yes, it becomes a necessary abstraction. Your personal website or news website (or many others) using React is a waste of my bandwidth and CPU cycles.

Don’t forget about server side rendering. If you only need to serve static, you don’t really need any Jack, anyway.
Post reply on HN