Preload by Agence Web Performance

Topic · 18 items

Performance

This page gathers everything Preload has covered on web performance: metrics and measurement, browsers, diagnostic tools, the weight of third-party scripts. It is for people who design, build or run websites and want to know what makes them faster. I follow every change that affects how we measure or optimize, with the concrete next step it calls for.

Follow this topic By RSS, in your feed reader

Preload #04 ·

JPEG XL vs AVIF: an independent benchmark keeps AVIF as the default

With JPEG XL now decoded by Chrome, the question of the default image format is back. Jake Archibald's benchmark, published October 15 (libjxl 0.12, avifenc 1.4.2, SSIMULACRA2 and ColorVideoVDP metrics), settles it for the web: on lossy photos, the best JPEG XL weighs 15 to 25% more than AVIF at default effort settings, and 30 to 90% more on screenshots and illustrations, while taking two to three times longer to decode. JPEG XL keeps the edge for lossless recompression of existing JPEGs (9 to 20% smaller) and for lossless compression.

Next step

Keep AVIF as your first choice, in 4:4:4 (4:2:0 chroma subsampling rarely saves bytes) and at the highest effort your build pipeline can afford. Save JPEG XL for a library of JPEGs whose originals are gone, always with a fallback in <picture>, since Edge doesn't decode it.

This matches our own benchmark, where AVIF came out lightest in 7 of 8 measurements at typical web quality settings.

Read the source

Preload #04 ·

Safari: one failed modulepreload can break a page until the next tab

A Safari visitor can stay stuck on a page after a single transient error (a 404, a CDN incident, a dropped request): in WebKit, a <link rel="modulepreload"> that fails stays recorded as loaded, and a later import() of the same URL rejects without retrying the request, even once the file is back. WebKit fixed it in Safari Technology Preview 255, released October 22; Safari 27.2, shipped October 26, doesn't mention the fix. Sites split into preloaded JavaScript modules, as many build tools produce, are exposed.

Next step

Test the failure path: make a module fail to load once, restore it, then check that a new request goes out. Add a bounded retry on the same URL (no random query parameter, which would create a separate module), and make sure your CDN and service worker don't keep serving the failed response.

In our October 28 test, the rejection survived a tab reload in Playwright's WebKit 27.2, while Chrome 156 and Firefox 157 retried the request: only a new tab unblocked the page.

Read the source

Preload #04 ·

pngdeer, a PNG compressor that picks its own quality

Screenshots and UI graphics that have to stay PNG can still get lighter: pngdeer, released as open source (MIT license), reduces their color palette (lossy compression) with no quality slider. It tries palettes from 2 to 256 colors, with or without dithering, scores each attempt with the SSIMULACRA2 metric and keeps the smallest file that reaches its target, capped at 90. On the author's benchmark (180 images, reproducible from the repository), the median file is 8 to 12% smaller than with TinyPNG; it ships as a command-line tool (Homebrew) and as an in-browser WebAssembly app that never uploads your images.

Next step

Run your UI PNGs through pngdeer, then through a lossless optimizer like oxipng, which remains complementary. Set the quality with --target if you want consistent results across images, and keep AVIF or WebP for anything that doesn't need to be PNG.

The project is young (424 stars and 33 commits so far) and the benchmark comes from its author: try it on your own images before adding it to a build pipeline.

Read the source

Preload #04 ·

Query Monitor 4.1 shows script weight, with a blind spot

Query Monitor, the WordPress debugging plugin, now shows the size of every enqueued script and stylesheet, with a total, since version 4.1.0 on October 26; 4.1.1 followed the next day to handle WordPress 7.2's loading changes. The size isn't read from the server: it's the transfer size measured by the browser (encodedBodySize, Resource Timing API) for the exact URL of the asset. So it stays empty, and counts as zero in the total, for a cross-origin script loaded without a crossorigin attribute, or for a file minified, combined or moved to a CDN by an optimization plugin.

Next step

Treat that column as a guide for the site's own files. For a page's real weight, open the Network tab in DevTools in a logged-out session: Query Monitor shows the page as generated for a logged-in user, bypassing the page cache.

Read the source

Preload #04 ·

The JavaScript cost of letting an AI agent pick the framework

Letting an AI agent choose a site's architecture can blow your JavaScript budget. Nolan Lawson had Claude Code build the same app, a content-heavy catalog with little interactivity, in 12 frameworks, five times each: median client JavaScript ranged from 0 KB with Astro to 142 KB with Next.js, and median LCP measured by Lighthouse from 810 ms to 2,090 ms. Agents often built a single-page app (SPA) even when nothing called for one: the agent building the no-framework version did so five times out of five.

Next step

Spell out the expected architecture (server rendering, separate pages) and a JavaScript budget in your agent's instructions, then measure the result in Lighthouse or the Network tab. On a Next.js 16.4 project, the next-bundle-optimizer skill, released the same day by the Next.js team, helps an agent find JavaScript that loads for nothing.

The SPA bias is real, while a content site only needs a few kilobytes of JavaScript. As the author himself points out, with a single model tested, this benchmark is one data point, not a verdict.

Read the source

Preload #04 ·

A field monitoring script hijacked to drain Polymarket accounts

A performance monitoring script can do a lot more than measure: on October 29, according to Hudson Rock's analysis, the DebugBear real user monitoring (RUM) file loaded by the betting platform Polymarket contained code that looked for the open session in the page, sold or transferred positions to an attacker's address, then reported back to a DebugBear server. Polymarket's Content Security Policy (CSP) allowed the script's host, and therefore anything it served. DebugBear asked customers to remove its embed code; Polymarket, which points to a compromised third-party provider, paused trading and promised refunds. How the script was compromised and which other customers were hit is still unknown.

Next step

Search your sites' code for cdn.debugbear.com and remove it. More broadly, load no third-party script, monitoring agents included, on account, checkout and admin pages. Subresource Integrity (SRI) only protects a frozen file: a vendor script updated in place breaks its hash.

Allowing a host in your CSP means trusting every byte it will ever serve. A monitoring tool has no business on a page where people pay or administer a site.

Read the source

Preload #04 ·

Basicrum, open source field monitoring on a single server

To measure Core Web Vitals from real visitors without a subscription, Basicrum has released an installer that deploys everything on one server with a single command: six Docker containers (Traefik, a Rust ingestion service, ClickHouse, Postgres, a Node API and a Next.js dashboard), fed by the open source Boomerang collection script. It needs at least 2 CPUs and 4 GB of memory for Docker, and handles TLS through Cloudflare Origin CA, Let's Encrypt or your own certificate.

Next step

Try it on a non-shared server (a VPS, a cloud instance or a dedicated server), in letsencrypt or cloudflare mode depending on your DNS. If you run Docker Engine 29 yourself, keep Traefik at 3.6 or later: older versions can no longer talk to it.

It's a credible alternative to paid tools once several sites share the collection. For a single site, a few lines of web-vitals and a small collector are enough; the brand-new repository doesn't show a license yet.

Read the source

Preload #03 ·

CSS scroll-driven animations become Baseline with Firefox 159

From October 27, you can tie a CSS animation to scrolling in every major browser, without JavaScript: Firefox 159 turns on scroll-driven animations by default, already available in Chrome 115 and Safari 26. The animation-timeline property, with the scroll() function (a container's scroll progress) and the view() function (an element's position in the visible area), plus the animation-range property, cover reveal-on-scroll, reading progress bars and parallax, which used to rely on AOS, GSAP ScrollTrigger or hand-written scroll listeners.

Baseline, newly available: Chrome 115, Safari 26, Firefox 159

Next step

Find the scroll effects still driven by JavaScript and rewrite them with animation-timeline, animating only transform and opacity, which stay off the main thread. Turn them off under prefers-reduced-motion and keep them as a progressive enhancement, for instance inside an @supports (animation-timeline: view()) block, so older browsers show the content without the effect.

This is a good time to drop a JavaScript library that ships on many brochure sites, and get a smoother effect that frees up the main thread.

Read the source

Preload #03 ·

Chrome measures the weight of ads, with two blind spots

Ads often slow down the pages that show them, without anyone knowing exactly which ones. Chrome can now recognize them (using EasyList, a public ad filter list, and the script that loads them), and DevTools, the browser's built-in diagnostic tool, shows them in an Ads tab: processing time and download size per ad, and a list of ad scripts. Google also publishes four metrics measured on real visitors (screen space taken, count, processing, size) for sites that declare their ad sellers in their ads.txt file.

Next step

On a page with ads, open DevTools (F12 key), Application panel, Ads tab: you'll see which ads and scripts weigh the most. Then cross-check with the Performance panel to find which ones make the page slow to respond to clicks.

Two blind spots in our tests: an ad script running directly in the page isn't counted, only ad frames are, and a Chrome driven by a testing tool shows everything at 0. The script list is therefore more reliable than the total for knowing which ad network slows the site down.

Read the source

Preload #03 ·

WordPress 7.2 beta: the admin loads its files separately and encrypts API keys

WordPress 7.2, in beta 1 since October 20 and due December 8, brings two changes your servers and plugins may notice. The admin no longer concatenates its scripts and styles through load-scripts.php and load-styles.php: files now load separately, so the browser caches them better, and those for the next screen are preloaded. The new Secrets API encrypts API keys in the database with the WP_SECRETS_KEY key, or failing that with a key derived from the salts in wp-config.php; the release also adds capabilities to the Abilities API and text-shadow in theme.json.

Next step

Test the beta on a staging site and review any server or firewall rules that target load-scripts.php. Define WP_SECRETS_KEY in wp-config.php before the first secret is stored.

Setting this key matters: without it, simply rotating the salts would make every stored secret unreadable.

Read the source

Preload #03 ·

php-rust: PHP rewritten in Rust already runs WordPress, just more slowly

The open source project php-rust reimplements PHP 8.5 in Rust, without reusing the Zend Engine's C code, with memory safety as the goal: Rust rules out use-after-free bugs and buffer overflows by design, two classes of flaws in the C engine. It runs WordPress 7.0.1 on a real MySQL and passes the core PHPUnit suite (30,472 tests single-site, 31,278 multisite), along with Composer, PHPUnit and Symfony's http-kernel; Laravel is next. It's still slower than official PHP: about 1.77 times the CPU on the WordPress suite, and 2.4 to 4.6 times on micro-benchmarks.

Next step

Keep it out of production and watch it as a lead; if you maintain a PHP plugin or library, running its test suite on it will show you where behavior differs.

Faster performance is a goal, not a given; the real value is memory safety, and parity on the WordPress suite is already a serious result.

Read the source

Preload #03 ·

An AI agent can now analyze an application's memory leaks

For a single-page application (SPA) whose memory keeps growing during a session, chrome-devtools-mcp 1.12.0, the MCP server that gives an AI agent access to Chrome DevTools, can analyze a heap snapshot (a snapshot of the JavaScript memory heap) without a connected browser since October 22, with paginated results. The release also runs independent tool calls in parallel, hot-reloads its configuration with --watchConfig and masks WebSocket headers in its logs. On the DevTools side, the Memory panel now flags unused closure variables kept alive by a shared V8 context, sorted by memory impact.

Next step

Take a heap snapshot in the Memory panel, have your agent analyze it through this server, then check its findings with the Objects retained by contexts filter.

Read the source

Preload #03 ·

opendesk, an open source helpdesk you can host yourself

To keep your support data in house, Mindroot has released opendesk, an open source helpdesk (Apache 2.0): shared support inbox, embeddable chat widget, public help center, AI (Anthropic, OpenAI-compatible models or a local model), API, webhooks and an MCP server. Written in Go and Elixir on Postgres, it self-hosts with a single command (Docker, Caddy) and runs the same code as the cloud offering. The project is new, and neither the widget's weight nor how it loads is documented.

Next step

If you embed the widget, load it on click behind a facade (a lightweight button that only loads the real script on interaction) and reserve its space to avoid CLS. An iframe doesn't isolate INP or CLS: measure it like the rest of the page.

Self-hosting settles the data sovereignty question, not the widget's cost to your site, which you should measure before rolling it out.

Read the source

Preload #02 ·

Chrome no longer runs unload handlers at all

What Edge shipped last week is now done in Chrome too: since version 155, unload handlers no longer run on any page load, wrapping up a gradual rollout that began in March 2025. Only the unload Permissions-Policy and an enterprise policy remain as escape hatches, and Chromium is about to make this the default for every browser built on it. Google says unload usage dropped from 18% to under 4% of navigations, and about 5% more navigations are now eligible for the back/forward cache.

Next step

Hunt down any remaining unload listeners, third-party scripts included, and move them to pagehide or visibilitychange. Remove any Permissions-Policy: unload=(self) header, which brings the listener back and excludes the page from the cache again. Firefox still drops pages that listen for unload, so the cleanup pays off there too.

Read the source

Preload #02 ·

CrUX finally measures soft navigations in single-page apps

Starting with the September dataset, released on October 13, CrUX adds three experimental variants of LCP, INP and CLS that count each route change in a single-page app as a navigation. They are available in BigQuery, the API, the History API and CrUX Vis, with FCP coming in November. Google aims to take them out of experimental status in May 2027, at which point Search Console would switch to this data. Across all origins, the share of good LCP goes from 68.3% to 72.1%.

Next step

On a single-page app, track both series side by side and note which dashboards and alerts only read the stable one. On a multi-page site, such as WordPress or PrestaShop without a decoupled front end, nothing changes.

A gap between the two series mostly reflects a change in what is measured, not a faster site: follow-up views reuse code that is already loaded. The JavaScript that runs on every route change still weighs on INP.

Read the source

Preload #02 ·

WebPerf Snippets: from console copy-paste to a complete toolkit

Joan León's diagnostic scripts, which you used to paste one by one into the console, became a toolkit with structured results in a single week (versions 2.0 and 2.0.1, October 13 to 15). A beta DevTools extension gathers them in a panel, even when the CSP blocks pasting, and CLI 1.0 also audits logged-in pages and compares them against CrUX data. In CI, a GitHub Action fails the build when a page goes over the performance budget you set. The same scripts are also packaged for AI agents, so they can run these diagnostics themselves.

Next step

Install the extension for live diagnosis and the GitHub Action to catch regressions, but always start from field data (CrUX, RUM) to decide what to fix.

An effective but clunky tool becomes easy to use, which means measuring more often.

Read the source

Preload #01 ·

JPEG XL arrives in Chrome 155, then in Firefox 158

Chrome 155, stable since October 6, decodes JPEG XL images with a new decoder written in Rust. Firefox 158 enables it by default on October 13 and adds image/jxl to the Accept header of its image requests. Safari has decoded it since version 17, for still images only. Google recommends trying both AVIF and JPEG XL and keeping whichever performs better: JPEG XL shines mostly for high-fidelity and lossless photos.

Partial support: Chrome 155, Firefox 158, Safari 17 without animation or progressive decoding

Next step

Compare JPEG XL and AVIF on your high-fidelity photos, then serve JPEG XL inside <picture> with a <source type="image/jxl"> placed before the AVIF and WebP sources, never on its own.

One more format in <picture>, not a switch. AVIF stays the first choice until your own measurements say otherwise.

Read the source

Preload #01 ·

Edge 155 no longer runs unload handlers

Since Edge 155, released on October 8, unload handlers no longer run on any page unless you explicitly re-enable them with the unload Permissions-Policy. The gradual rollout that began in Edge 152 is complete. Like Chrome 155, the release also ships margin-trim (block and multicol containers), symbols() and text module imports (import … with { type: "text" }).

Next step

Search your code and third-party scripts for leftover unload listeners (analytics, form autosave) and move them to pagehide or visibilitychange. As a bonus, the page becomes eligible for the back/forward cache.

Read the source

Eroan Boyer
Founder of Agence Web Performance

What comes next, Tuesday morning.

Items on this topic land in Preload every week, two weeks before they go public. Free, one-click unsubscribe.