Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

111–120 of 283 posts

Re: The impact of removing jQuery on our web performance

#113
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!

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.

Re: The impact of removing jQuery on our web performance

#114
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!

We Germans probably have a standard design system for the documents we send by Fax...

Re: The impact of removing jQuery on our web performance

#115

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.

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 each person. They still told me it was my fault.

Re: The impact of removing jQuery on our web performance

#116
post #57

Earlier quoted context omitted.

I remember how it was good practice to assign width and height to tags. The idea being the browser would know how to render the things around the picture without needing to download the picture first, preventing the page from jumping around as the quicker and lighter HTML was downloaded and rendered first.

That still is a best practice. That "jumping around" is now referred to as "CLS" -- Cumulative Layout Shift -- one of the "Core Web Vitals" metrics used to quantify performance-related UX.

I sometmes like CLS, it makes it look like things are happening instead of feeling like a wait time. I recently used a simple templating mechanism

elem = jquery.clone() ... elem.slideDown()

And this renders bits of the page moving them as it does it; slideDown() is in jquery core. It used to be popular before that biz of rendering grey squares first got invented

Re: The impact of removing jQuery on our web performance

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

Greece: https://guide.services.gov.gr/

Re: The impact of removing jQuery on our web performance

#118

Earlier quoted context omitted.

You have to really do some extra work to make this happen "nicely". Swapping out parts of the page without jerking the user around is a difficult problem, especially if you aren't working with fixed sizes of elements. And creating a "skeleton" system of placeholders during loading is a whole other set of state you have to build out and maintain. I find most sites using this kind of progressive loading are completely…

GP was talking about loading JS, adding JS to a webpage doesn't affect its rendering (unless the loaded JS is DOM-manipulating) does it ?

Yes it does by default.

You can document.write() in js by default so it has to wait for the js to load.

"async" tag stops the default behaviour but the person writing the blog does not sem to know what.

Re: The impact of removing jQuery on our web performance

#119

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.

gov.uk serves all of the UK - including the person who lives in the middle of the mobile dead spot, and the person who can't even get consistently working ADSL. 4G/5G doesn't cover the UK by a very long way, and there's plenty of the UK who cannot afford anything but the cheapest smartphone.

It's much less common in the UK than the US to buy a smartphone on credit - cheap phones with cheap pre-paid plans are normal - so low-end models with very slow chips are more common. The sort of thing where even scrolling through your contact menu will induce lag.

Re: The impact of removing jQuery on our web performance

#120
post #2

When I did web development, I specifically loaded JS lazily so first you got a pure HTML page with just a few lines of code. Those lines of code are normal (not jQuery) JS that loads the rest of the JS lazily in a progressive enhancement. This means the page can start being rendered before the jQuery code loads. But in fact, jQuery is largely not needed since Internet Explorer lost market share and there's less of a…

> jQuery is largely not needed since Internet Explorer lost market share and there's less of a need to have lots of workarounds for it. As someone who's late to the webdev party I feel that jQuery is pretty awesome (all I ever heard is people poopoo it). The vanilla API for the DOM manipulation is just plainly awful and borderline nonsensical so I'd say jQuery is still very much needed.

I don’t do front end work any longer but JQuery was the glue that held webpages together in the time of IE. Before the rise of Big Tech JS Frameworks it was the work horse getting things done in the browser while trying to have cross browser compatibility.
Post reply on HN