Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

141–150 of 283 posts

Re: The impact of removing jQuery on our web performance

#141
post #64

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…

>If only jQuery was modular and didn't require to load 300 or 400 Kb of code. JQuery's own site says the library is 30 to 40 Kb, not 300 or 400. The minified JS file I downloaded of the latest version is 87 Kb, so I assume the rest would be taken care of with zip headers. Are people routinely serving the uncompressed version of the library?

It seems that you are right, the 300Kb number is about an uncompressed version. Still it is very large and includes lot of code I don't need.

Re: The impact of removing jQuery on our web performance

#142

At the end he said a certain cohort of users, but how many users were actually in that cohort? JQuery is an older technology. I find it hard to believe something made to work on older hardware / internet is affecting performance that much. We have 5G and stupid fast chips in phones now. I’m skeptical. Performance issues are usually database queries or code compiling / “waking up” some server function.

There is a massive difference between using a library like jQuery and using vanilla JS for similar purposes. I would not be surprised if a lot of frontend devs aren't fully aware that a lot of functionality is now available in modern, vanilla JS vs. using a library.

The website is a bit of a parody, but the numbers are real: http://vanilla-js.com/

For similar functionality, modern, native JS is orders of magnitude faster than almost all JS libraries. The libraries obviously do more, but they also account for older browsers and just by their nature have a lot more overhead.

The point about edge case devices also should not be missed – the assumption that "we have 5G" should be a target is really quite surprising. There are always cases for a more optimum website. When traveling and there is low signal, or people on pay-per-MB plans, and more – there are all kinds of people that can benefit from a slimmer and lighter (compute-wise) website. The stupid fast chips are not used by everyone, in fact, not even the majority.

Re: The impact of removing jQuery on our web performance

#143
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…

[deleted]

Re: The impact of removing jQuery on our web performance

#144

Earlier quoted context omitted.

The article goes on to explain that they are optimising for extremely low spec devices used by financially and socially disadvantaged users. The majority of their users load pages in less than 1s (likely due to caching and connection). Some users take 25s or more to load a page. It is for these edge cases they were testing.

They're testing against a hypothetical user on a 2G cellular connection. I can't see many situations where that would happen. Being poor doesn't mean you can't afford 3G because every data plan in the UK includes 4G as a mimimum. Often 5G is included too. You have to be extremely rural to drop down to 2G and rural people are often better off. Poorer people tend to be in urban areas that have better digital infrastruc…

No post body was provided.

Re: The impact of removing jQuery on our web performance

#145
post #39
post #16

Earlier quoted context omitted.

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…

Australia: https://designsystemau.org/ it was the official design system until it got defunded, now I believe it's run by open source

Wow that might be the fastest website ive seen

Re: The impact of removing jQuery on our web performance

#146
post #78

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…

I'm with you on fetch() requests not being able to be aborted, but I didn't think there were any other reasons to use XMLHttpRequest over fetch in 2022. I've been fetch() only for a few years as this point - what older browsers are you targeting that don't support fetch()?

fetch doesn't support upload progress

https://javascript.info/fetch-progress

> Please note: there’s currently no way for fetch to track upload progress. For that purpose, please use XMLHttpRequest, we’ll cover it later.

coming soon (2020) https://ilikekillnerds.com/2020/09/file-upload-progress-with...

Re: The impact of removing jQuery on our web performance

#147
post #104
post #69

Earlier quoted context omitted.

I'm afraid there won't be anything like that in Germany any time soon.

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!

> Next you’re going to say the Swiss also don’t have one

Well... at a federal level there is, but it's a confederacy so most of the time you're interacting with a local canton which has it's own set of systems.

Re: The impact of removing jQuery on our web performance

#150
post #115

Earlier quoted context omitted.

Every local councill has a different payment system for colecting councill tax, and all of them fail in novel and unpredictable ways. Last time they collected my name and address over the phone and got both of them wrong. Then they were sending letter to a person that doesn't exist, to an address that doesnt exist, never used my email or phone number, didn't respond to my email, but still told me it's my fault!

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…

In the world of councils, an address is an account.

They just need to make sure that every address is paid for every day of the year - that's the way they maximize their revenue. They don't really who pays, as long as someone does. Hence the account system keyed on address.

Post reply on HN