TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How and why we removed jQuery from Gov.uk

49 pointsby ycitmalmost 3 years ago

8 comments

antipaulalmost 3 years ago
This team is really something when it comes to transparency.<p>For a government entity, an unreasonably large amount of their work is on GitHub. Examples:<p>Front end design system: <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-frontend" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-frontend</a><p>Project board: <a href="https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;alphagov&#x2F;projects&#x2F;4" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;alphagov&#x2F;projects&#x2F;4</a><p>Requests for comment: <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-rfcs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-rfcs</a><p>Gov.uk infrastructure as code (WIP): <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-infrastructure" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;govuk-infrastructure</a><p>“The GDS way”: How they work, tech stack, processes, etc <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;gds-way" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;gds-way</a><p>“Terraform modules for on-boarding with Cyber Security services eg define the IAM SecurityAudit role”: <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;cyber-security-shared-terraform-modules" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov&#x2F;cyber-security-shared-terraform-...</a><p>Full GitHub org with &gt;1,500 repos: <a href="https:&#x2F;&#x2F;github.com&#x2F;alphagov" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alphagov</a>
评论 #32428936 未加载
评论 #32429823 未加载
评论 #32432029 未加载
b5almost 3 years ago
For anyone thinking that this is an insignificant saving of &quot;only&quot; 32kb, it&#x27;s really important to remember that many of the site&#x27;s users will be amongst the poorest in society. Many of them will be accessing it using the oldest, slowest devices; things far slower than the average HN reader&#x27;s last few phones. <i>Anything</i> that can be done make the site work better for them is worth the effort.<p>Terence Eden has a really good blog post about just this topic: <a href="https:&#x2F;&#x2F;shkspr.mobi&#x2F;blog&#x2F;2021&#x2F;01&#x2F;the-unreasonable-effectiveness-of-simple-html&#x2F;" rel="nofollow">https:&#x2F;&#x2F;shkspr.mobi&#x2F;blog&#x2F;2021&#x2F;01&#x2F;the-unreasonable-effectiven...</a>
评论 #32432752 未加载
评论 #32435391 未加载
anonymous344almost 3 years ago
Yes but how much the js-code parts grew because longer scripts length in vanilla javascript? And how much added for another ajax library? I don&#x27;t see that using vanilla js instead of jquery gives enough advantage compared to that i have a much more pain writing that frontend code with vanilla. And specially replacing ajax or get (fetching json) with error handling (no server at all, server error, data not found -cases) is just awful with axios for example.
评论 #32430983 未加载
ncr100almost 3 years ago
Nice to see transparency in government. Pride in work. Helpful stuff.<p>Keep it up!
评论 #32426983 未加载
PeterWhittakeralmost 3 years ago
This article is an excellent “how to” recipe for going about this sort of refactoring, from the importance of training and of getting the backend folks on side, to clever use of attrition (no more jquery in new, then start removing it from old), and identifying sites that still needed it and accommodating them.<p>Seems like a well managed project.<p>(Yes, yes, this could be a very glossed over account that ignores frictions and factions along the way, but I quite enjoy taking it at face value.)
Warputinalmost 3 years ago
32kb is nothing these days! Hopefully they have sane caching of their assets, which means it would rarely need to reload the asset.
评论 #32428131 未加载
评论 #32428020 未加载
labradoralmost 3 years ago
If 32K is going to degrade your internet experience then you have more problems than just jQuery
评论 #32429484 未加载
kordlessagainalmost 3 years ago
They presume a &quot;problem&quot; is loading 32KB of data and the fix was spending a lot of tax dollars to replace it? Insane.
评论 #32427542 未加载
评论 #32426211 未加载
评论 #32426963 未加载
评论 #32428951 未加载
评论 #32427329 未加载
评论 #32432584 未加载