Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

151–160 of 283 posts

Re: The impact of removing jQuery on our web performance

#151
post #64

Earlier quoted context omitted.

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

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

Re: The impact of removing jQuery on our web performance

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

1. Our population is quite old thus many people in key positions are quite old and missed the transition to the digital world.

2. So. Much. Bureaucracy.

3. Another factor that doesnt help is that the government pays quite poorly compared to the private companies. Any semi talented dev will find a better position than working for the government

Re: The impact of removing jQuery on our web performance

#153

Honestly I feel like jQuery is my "secret weapon" similar to how Lisp is Paul Graham's in Beating the Averages. It's so much more productive than vanilla JS with negligible impact on performance, especially with caching.

JQuery has better alternatives like Alpine.js or HTMX which are much lighter and easy to use.

Re: The impact of removing jQuery on our web performance

#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) to still poor (9 seconds). Probably less because they'd normally have a warmed up cache.

Is it empathetic to improve performance for those users? Very much yes, do it as far as you budget allows for. But as it comes to jQuery specifically, the conclusion is that its negative impact is negligible.

Re: The impact of removing jQuery on our web performance

#155
post #106

Earlier quoted context omitted.

Slightly off-topic. Ok, off-topic. I find it exceptionally galling that the so-called Inflation Reduction Act sends $80 billion to the IRS, of which $15 million is earmarked “to fund a task force that would study the cost and feasibility of creating a free direct e-file program.” Spoiler alert fellas - it’s feasible, and it should have been done 20 years ago. https://crsreports.congress.gov/product/pdf/IN/IN11977

Id love to know what the potential reasons are for it being infeasible. Intuit doesn't want us to?

I feel like the quickest, easiest, and most politically paletable approach would be for the government to just buy Intuit.

The market cap is $130B, three quarters of which could probably be recovered by reselling the half of the business that deals with foreign/international accounting and large business accounting.

Just keep the stuff for individuals and companies with under 250 employees in the USA. Then make all that software available for free.

Over time, integrate that software deeper into IRS processes - for example, the software could autofill fields with stuff the IRS already knows. The web based stuff could go onto a .gov website and become the official way to file accounts and taxes.

Re: The impact of removing jQuery on our web performance

#156
post #122

Earlier quoted context omitted.

> We have 5G and stupid fast chips in phones now. The people who need government services the most won't have this

Do we have hard data on this? Just want to make sure we aren’t just making assumptions. I would think most folks of any income would replace their phones even every 5 years, simply because the batteries would’ve died. And I’d think any phone in the past 5 years would be reasonably decent. Even the ultra cheap ones. Plus with networks, cell carriers are at least incentivized in general to get folks off 3g into lte sin…

GDS have it (or at least proxies for some of it) as part of their RUM data

Device memory is a good proxy for how powerful the phone is

Effective connection type will give some data on network performance

Re: The impact of removing jQuery on our web performance

#157
post #102

Earlier quoted context omitted.

TFL is a "Statutory Corporation" which is funded both by grants from local government and commercial income, the majority from rail+bus fares but also from activities such as advertising. There is a significant quantity of advertising placements provided by TFL, in the stations, on buses, bus stops, and as it seems on their website. TFL was almost bankrupted by Covid, I for one will give them a pass on the ugly adver…

Absolutely crazy that public transport even has the possibility of being "bankrupted".

I think it's mostly a political move.

Things like "we have so little money we had to replace half our homepage with ads" is a good sob story, and will help them get billions in government funding, even though the ads probably only bring in a few thousand pounds.

Re: The impact of removing jQuery on our web performance

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

Austria: https://design.austria.info/en/design-system/

Of all the examples in this thread, this is the only one that isn't a plain HTML page, but rather a pile of javascript that takes several seconds to load and shows nothing but an "enable javascript" banner without JS. Despicable, but also absolutely typical.

Edit: alright, CZ, UA and RU further down the thread are the same, I just hadn't gotten to those yet. Still, absolutely unacceptable for a government design standard.

Re: The impact of removing jQuery on our web performance

#159

Earlier quoted context omitted.

The article is talking more about the execution time to read, parse, and execute the library -- that isn't cached at all.

Seems like the writer hasn't heard about the trick of putting js at the bottom of the page, or the async html5 tag. Looks like the had jquery in the head section on every page. That's not really jquery or javascript's fault.

The writers are Matt Hobbs and Andy Sellick, respectively Head of Frontend Development and Senior Frontend Developers at GDS. They may have considered alternative options.

Here's a previous article explaining why they did what they did:

https://insidegovuk.blog.gov.uk/2022/08/11/how-and-why-we-re...

Re: The impact of removing jQuery on our web performance

#160

Earlier quoted context omitted.

The UK. domain is one of the few that used to reproduce and enforce (almost) the gTLD hierarchy under itself, thus CO.UK., ORG.UK., GOV.UK., etc. (They gave up several years ago I think.) (Unlike with almost every other ccTLD, UK is also not the ISO code for the country—GB is—and is instead “reserved”, which is why I must struggle to remember each time that the BCP 47 for Ukrainian-in-Ukraine is uk-UA.)

.au used to be third-level only too (or fourth-level in places, e.g. *.vic.edu.au for the state of Victoria), with careful rules about each, including things like requiring that the name match your business/whatever, trademark, or something your business sells or does (which eliminates the vast majority of squatting in theory without the additional “no squatting” rule, and in practice there wasn’t much, and also ensu…

A bit of internet trivia is the oz.au domain. In the late 1980s, the Australian universities were connected in a network with names ending .oz.

When the TLD .au arrived, .oz was renamed .oz.au. So my email address at Elec Engineering at Melbourne University was @ee.mu.oz.au.

And then a few years later, the third-level structure got formalised. Melbourne Uni, for instance, switched from mu.oz.au to unimelb.edu.au.

I for one missed the typographic economy of the ee.mu.oz.au domain.

None of this really matters, of course, except that a sensibly designed structure with a clear underlying rationale, and historical context for a small number of exceptions, makes everything easier to understand :)

Post reply on HN