Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

181–190 of 283 posts

Re: The impact of removing jQuery on our web performance

#181
post #33
post #14

> Now I know what you may be thinking, that doesn’t sound like a lot of data, especially compared to images which can be multiple megabytes in size. But when it’s on every page, from a web performance perspective, it equates to a lot of data. Er... the utility of jQuery in 2022 aside, I would say: if it equates to a lot of data when it's on every page (of a single website), you're doing something wrong?! I mean, cach…

Yeah but for what? I have been writing vanilla js for years now and aside from the sometimes slightly more convenient syntax I haven't missed a thing where using jQuery would have helped me over not using it. I don't say anything against loading useful javascript libraries, but too many websites load 1 MB of libraries just to get a result that they could have achieved with a few lines of handcrafted vanilla js. This…

jQuery was actual worth it about 15 years or so ago when browsers were far less compatible and Javascript compliant than they are now. The juice isn't worth the squeeze now, though.

Re: The impact of removing jQuery on our web performance

#182
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 (…

I am also excited about gov.uk tech blog posts. My point: They are always "looking in the mirror": "How can we become faster and more accessible?" Making digital gov't websites as accessible as possible is an incredibly important social priority for modern governments in the 21st century.

Re: The impact of removing jQuery on our web performance

#183
post #16
post #4

Has anyone noticed how all UK government websites like https://www.gov.uk/ , https://www.nhs.uk/ , https://tfl.gov.uk/ , https://coronavirus.data.gov.uk/ have the same look-and-feel and the same UX? Are there more such examples of countries that have uniform UX for their government websites?

Yes, this is an example of government design systems, which are becoming popular among developed countries: - The UK: https://design-system.service.gov.uk/ - The US: https://designsystem.digital.gov/ - Canada: https://www.canada.ca/en/government/about/design-system.html - Argentina: https://argob.github.io/poncho/ - Italy: https://designers.italia.it/ - Singapore: https://www.designsystem.tech.gov.sg/ - Estonia: http…

OMG. This is HN! Can we please get a showcase of the best e-gov't website globally? Right away, when I saw that Italian gov't has a web design studio, I was curious! Do they have some beautiful, but highly functional websites that any Italians can share? (Apologies for positive stereotyping!)

Re: The impact of removing jQuery on our web performance

#186
post #33

Earlier quoted context omitted.

Yeah but for what? I have been writing vanilla js for years now and aside from the sometimes slightly more convenient syntax I haven't missed a thing where using jQuery would have helped me over not using it. I don't say anything against loading useful javascript libraries, but too many websites load 1 MB of libraries just to get a result that they could have achieved with a few lines of handcrafted vanilla js. This…

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…

> If only jQuery was modular and didn't require to load 300 or 400 Kb of code.

It is? You can use grunt to make your own version, excluding the parts you don't need.

Re: The impact of removing jQuery on our web performance

#187
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 (…

> They have to descent all the way to 2G to see any meaningful difference Somewhat shockingly according to https://www.cambridgewireless.co.uk/news/cw-journal/why-2g-w... 12% of mobile network connections in the UK are still on 2G? That's surprisingly high usage, and would definitely be worth optimizing. Although usage that high would then explain why 2G shutdown is still 10 years(!) away for the UK. Phones still on…

I wouldn’t read too much into 2G figures meaning 2G-only phones (or 3G). In my experience once you get out of populated areas connections often drop to 2G, even on my 5G capable iPhone. It’s mostly a coverage issue not a handset issue.

Re: The impact of removing jQuery on our web performance

#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. I am not living in the UK, but if I was, I would be happy to pay taxes that make government websites 25% faster.

And even without the performance benefits, I consider removing dependencies a good thing. jQuery was great in the IE6 days, but now that even 10 year old browsers have decent JS, it is not as important as it once was. Modern versions of jQuery don't even support IE6 anymore.

Re: The impact of removing jQuery on our web performance

#189
> But when it’s on every page, from a web performance perspective, it equates to a lot of data.

Author of this article is apparently unaware of browser caches.

> JavaScript is known as a “render-blocking” resource.

Yeah, if only there was, like, an async attribute or something.

> The graph below shows time to interactivity dropped from 11.34 seconds to 9.43 seconds

So, jQuery is way too heavy for these people, but interaction tracking analytics (these packages usually start around 200kB) is perfectly fine?

> total page load time dropped from 19.44 seconds to 17.75 seconds

Burying the lede here, if my team celebrated a 17 second page load, we'd be fired on the spot. Going out on a limb here to suggest jQuery is the least of their problems.

Re: The impact of removing jQuery on our web performance

#190
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 (…

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.
Post reply on HN