Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

201–210 of 283 posts

Re: The impact of removing jQuery on our web performance

#201
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?

They all use this design system: https://design-system.service.gov.uk . It's much more than just a CSS framework, it's full specifications on how to implement easy to follow and sensible UX. I wish there was more buy in by local councils of this system, there are some incredibly poor local government sites.

> They all use this design system

Does that system require absurd cookie banners? Gov.uk should be leading the charge against ridiculous cookie banners.

Re: The impact of removing jQuery on our web performance

#202

Honestly if they'd just used jQuery instead of React all the way through they'd be loading a lot less JS and performance would be vastly better on those slow old devices. After all, jQuery was made for the slow old devices, in the time they were not slow or old. The real problem is that jQuery is not new and shiny, and nobody wants to be doing jQuery in 2022.

[deleted]

Re: The impact of removing jQuery on our web performance

#203
post #41

Earlier quoted context omitted.

They all use this design system: https://design-system.service.gov.uk . It's much more than just a CSS framework, it's full specifications on how to implement easy to follow and sensible UX. I wish there was more buy in by local councils of this system, there are some incredibly poor local government sites.

> I wish there was more buy in by local councils of this system, there are some incredibly poor local government sites. You may be interested in Local Gov Drupal. Unfortunately they've defined themselves around a specific tool, rather than a design library, but maybe that was what it took to get them to come together. Seven councils are using the solution, and around 30 councils are involved in the initiative, but th…

> You may be interested in Local Gov Drupal

Not much!

/me former Drupal developer. Drupal makes super-heavyweight pages, and is a real pain to learn. There is no backwards compatibility between major releases; to upgrade, you have to rewrite your site.

I burned 8 years working on Drupal sites. I made a living, but I ended up hating Drupal with a passion.

Re: The impact of removing jQuery on our web performance

#204

Earlier quoted context omitted.

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

Since the gov.uk page is talking about 2G users, I'd imagine that "old browsers" here means "whatever Nokia shipped over a decade ago"

2G users can include “users on the latest iPhone or Samsung who are in Scotland”. Try https://www.o2.co.uk/coveragechecker and look at Kinlochewe for an example.

Re: The impact of removing jQuery on our web performance

#205
post #113
post #104

Earlier quoted context omitted.

Wait, the Germans, of all people, don’t have a standard government design system? Next you’re going to say the Swiss also don’t have one, and I’ll have to throw out my entire set of national stereotypes!

As someone from Germany I'm sometimes surprised what stereotypes exist outside Germany about it. I can assure you standardizing things is not something Germany is good at.

Public sector and the old people are not good at modern solutions, but German officials and companies in general are still very driven in organizing and standardizing the soul out of everything.

Re: The impact of removing jQuery on our web performance

#206

Earlier quoted context omitted.

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.

It varies wildly depending on which network you are on. For example, on EE I get 4G coverage almost everywhere - even across remote parts of the Scottish Highlands and Islands. OTOH, my missus is with Three, and she rarely gets 4G at all outside of towns and cities.

Yes good point. Also the phone signal can be deceptive if the backhaul is terrible (which I found with EE quite often).

Re: The impact of removing jQuery on our web performance

#207

> especially compared to images which can be multiple megabytes in size Please don't put images of multi-megabytes size on web-pages. My boss put a 10-megabyte image on the homepage of one of our clients; he fancied himself a photographer, and he took the photo. It gave a 10s page-load time from a desktop PC. I offered to shrink it for him, which would have taken 2 minutes; he wasn't having it. I don't think it was p…

Adding...please use the img tag's sizes and srcset to maximize performance.

Please stop using desktop sized images across all viewports when using background images.

Re: The impact of removing jQuery on our web performance

#208

Earlier quoted context omitted.

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.

> Making digital gov't websites as accessible as possible is an incredibly important Indeed - websites are the most convenient way to access government services. So it's important that government websites don't rely on technology that isn't universally available. So I wish gov.uk sites would stop insisting on a smartphone (or SMS) for 2FA. Phones have these problems: * They cost a lot. * It's impossible for the avera…

> So it's important that government websites don't rely on technology that isn't universally available.

IMO this should also mean they have offices and phone lines with minimal hold time. Not everyone can use the web fluently, and a website is a cheap replacement for human guidance.

Re: The impact of removing jQuery on our web performance

#209

Earlier quoted context omitted.

Agree. Plus one can use a cdn to increase the chances of the library being already downloaded.

Won’t work Browser caches are partitioned by origin so if a.com and b.com both use jquery from c.com then two copies of jquery will be cached one with a key of a.com/c.com and another with b.com/c.com

Have browsers always done this?

I thought and heard that using a JS library from CDN is beneficial when users already have that same cached JS library from visiting other sites. But you're saying that's not a thing? So what's the benefit of using a CDN for jquery then?

Re: The impact of removing jQuery on our web performance

#210
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%…

12 seconds down to 9 seconds is not negligible

That is not what the person you were replying to claimed. Their claim was that the overall effect of removing jQuery was negligible, and made a persuasive argument to support it, while also acknowledging that making modest improvements to the experience of a minority of users was an admirable achievement.

What is negligible is 12 down to 11.999 seconds because you prematurely optimized

Who could disagree with that verdict over an imagined scenario? I would even go so far as to say it could be considered negligible whether or not the optimization was premature or not.

And even for "normal" users, shaving milliseconds matter. The general idea is that a UI should respond within 100ms to feel instantaneous.

9 seconds is pretty fucking far from 100ms. Far enough that I feel like shaving milliseconds off does not in fact matter to the majority of “normal” users.

According to Google research, increasing page load time from 1s to 3s increases bounce rate by 32%.

Fascinating. What does the research say about increasing the load time from 9 to 12 seconds? Those are after all the figures that are relevant to this discussion.

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.

I’m sure the UK government is thrilled that you approve of how they spend their tax revenue. But just to reiterate: We’re not talking about a 25% improvement of websites across the board. We’re talking about a 25% improvement of a specific page for a small subset of users.

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.

I doubt anyone disagrees with this as a general statement. Certainly it would probably be a mistake to take on jQuery as a dependency today. However, it does not cost nothing to remove jQuery from a code base that has depended on it for a long time. And the cost has to weighed against the risk and the cost, not least of which is the opportunity cost: What could the programmers tasked with removing jQuery have done with their time instead?

Post reply on HN