惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
博客园_首页
H
Help Net Security
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
The Cloudflare Blog
腾讯CDC
Jina AI
Jina AI
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
爱范儿
爱范儿
N
Netflix TechBlog - Medium
F
Fortinet All Blogs

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno
How the Guardian uses Deno to audit accessibility and per...
Andy Jiang · 2024-06-18 · via Deno

Leading independent publication, the Guardian, needed a lightweight, low maintenance solution to audit the performance and accessibility of their articles. Learn how the Guardian uses Deno in critical infrastructure to audit accessibility and performance across their 2.7 million articles.

The challenge

Each month, the Guardian’s website receives over 350 million unique page views. In order to meet readers’ expectations, their website must not only be optimized for performance and serve content as quickly as possible, but also support a diverse range of web accessibility requirements.

As a large media site, every millisecond counts. According to BBC, every additional second a page takes to load causes 10% of users to leave. “We needed a way to ensure that our assets are optimized when they get published to our website,” says Max Duval, senior software engineer for the website.

Beyond performance, the engineers also acknowledge that many of their readers use a wide range of assistive technologies to consume the content from their website. To make sure their stories are widely read, they must support web accessibility requirements. “A manual audit revealed some of our articles included HTML elements that were missing critical attributes,” Max says. “We wanted to make sure any new articles follow the best accessibility practices, but didn’t have a systematic, automated approach to surfacing these discrepancies at scale.”

The solution

The team knew they needed to build an automated system for assessing accessibility and performance discrepancies. They first turned to Node, but ran into complexity issues. “Using Node for something as simple as downloading a page and looking at it was super complex,” Max says. “Doing a GET request, parsing URLs, resolving redirects, all required evaluating and installing a library.” But using Deno, which natively supports web standards APIs, this same script was much simpler. “There’s no risk for dependency bloat with Deno, as there is with Node and npm.”

They also enjoyed using Deno for its native TypeScript support. “The Guardian has traditionally used Scala for most of its server code, where strong typing is a given. TypeScript has steadily grown in popularity, but it’s difficult to use for non-bundled applications. Being able to write and execute TypeScript without configuration has helped our team move faster,” Max says.

Their automated system runs Deno scripts everyday on GitHub Actions to check for missing HTML attributes, as well as size of assets like images, fonts, and other media, to assess for accessibility and performance. Any deviations surfaced by the job will update these GitHub issues for their team to investigate.

“Deno made it easy for us to spin up a solution to cover our bases, which helps ensure our stories can be consumed by the widest possible readership,” says Max.