SvelteKit 2.70.3 · Svelte 5.57.1

SvelteKit defaults that cost you

The scaffold turns on hover preloading for every link. Reading a list became 13 server loads for one opened page. And streamed data never made it into the HTML markup.

Server loads for one opened page

scan: rest on 12 rows, open 1
hover 13
tap 1
false 1
navBrowse: rest on 5 nav links, open 1
hover 5
tap 1
false 1
median of 5 runs · node build · 30 Sep 2026
The problem

Every rest is a request

With hover, every link the pointer rests on for about 20 ms runs that page's load. On a navigation bar that's cheap and makes clicks feel instant. On a list people read, it is many server loads for one page view.

Streaming has a similar trap. An un-awaited promise from a server load makes the first byte fast, but the content is not in the HTML markup. It arrives later in an inline script. Readers that strip scripts, and browsers without JavaScript, see the placeholder.

The default you probably have
<!-- src/app.html -->
<body data-sveltekit-preload-data="hover">
demos/03-defaults-that-cost/src/app.html · as scaffolded
Measured on node build · 30 Sep 2026

Server loads per path, by preload setting

Real Playwright mouse events at 60 Hz on a production build. Median of 5 runs, range in brackets. Server load 150–300 ms. Windows 11, i9-13900KF.

Pointer pathhovertapfalselist tap
scan: rest on 12 rows, open 113111
skim: slide over 24 rows, open 11 (1–2)111
navBrowse: rest on 5 nav links, open 15115
nav / direct1 (nav 1–2)111 (nav 1–2)
24.6 KB

vs 1,900 bytes

Data transferred on the scan path: hover (median 24,564 bytes) vs tap. Server load counts are exact; byte counts are medians.

95 ms

The gain is real

With a 300 ms load and a 300 ms rest, hover showed the page 95 ms after the press. Preloading off: 407 ms. Tap: 313 ms. The gain is capped by how long the pointer rests.

191 vs 989

Characters of text in the HTML

With the product streamed and the head waiting for it, the served HTML had no <title> and no meta description, and 191 instead of 989 characters of text.

First HTML, product page

awaited: everything in the HTML
808 ms
streamed reviews: fast, reviews not in the markup
156 ms
median of 10 requests · node build · 30 Sep 2026

A trap in the measurement itself

On vite preview, streaming looked broken: readable HTML at 812 ms although the first byte came at 156 ms. The cause is its gzip middleware, which doesn't flush. My own earlier probe got this wrong, and the guide says so. Measure streaming on node build with a client that asks for gzip, like every browser.

Measured Rules · 10 rules, 18 passing tests

Scope the defaults, don't fight them

Your assistant keeps writing the code. The rules tell it which pattern to use and why, in the format it reads: a Claude skill, a Cursor rule, Copilot instructions or AGENTS.md. Every rule names the test that backs it.

  1. 01 Know what hover runs. in the pack
  2. 02 The preload cache has one slot and no expiry. in the pack
  3. 03 Scope preloading per area, not per app. free
  4. 04 On touch devices, hover and tap are the same, and a scroll can preload. in the pack
  5. 05 Preload code, not data, when the load is the cost. in the pack
  6. 06 Expect a latency gain no larger than the rest time. in the pack
  7. 07 Stream only content that can be missing. free
  8. 08 Await what search engines, previews and AI tools must read. in the pack
  9. 09 Measure streaming on the real server, with a browser-like client. in the pack
  10. 10 Don't expect SvelteKit to treat bots differently. in the pack

Rules 3 and 7 are free in the demo README. The pack adds the rest, templates, an audit prompt, a PR checklist and the tests to run in your own repo.

What you get

The guide, the rules and the checks

Guide cover: SvelteKit Defaults That Cost YouGuide page: chapter 1, Every rest is a request
Guide 03, draft PDF · 3 chapters
  • Chapter 1: every rest is a request. Pointer paths, phones, the one-slot cache.
  • Chapter 2: what preloading buys, and where to keep it. Latency, code-only preloading, scoping per area.
  • Chapter 3: streamed data and readers without JavaScript. What's in the markup, the head, bots, the vite preview trap.
Planned pricing

Pick what you need

Guide

€19 PDF

Base price (bazna cijena) on 16.10.2026: €19

  • The full guide (3 chapters)
  • Every measurement with versions and scripts
  • Free updates to this edition
Join the waitlist

Team

€199 up to 10 developers

Base price (bazna cijena) on 16.10.2026: €199

  • Everything in Guide + Measured Rules
  • Licence for up to 10 developers of one company
  • Commit the rules to all of your company's repos
Join the waitlist

Planned prices. Sales open soon. The waitlist hears first. Season 1 bundle: all four topics, Guide + Measured Rules for €99 (base price (bazna cijena) on 16.10.2026: €99), or any three topics for the price of two. Prices in euro, VAT included. Payment goes through Paddle, the merchant of record; a business can enter its VAT ID at checkout, and reverse charge then applies where the law allows.

Free now · guides soon

Get the SvelteKit defaults checklist

One page per topic, every check backed by a measurement: section renderer, ssr state, sveltekit defaults and big lists in svelte 5 state.

  1. 1Enter your email. You land on our mailing-list page.
  2. 2Open the confirmation email from hello@measuredfrontend.com and click the link.
  3. 3The confirmation page lists the four PDFs. About one minute in total.

After that: one email when the guides open, and a short note when a new measurement is published. Unsubscribe in one click. No confirmation, no emails: the address is deleted within 30 days.

Double opt-in: nothing is sent until you click the link in that email.

FAQ

Questions

Why not just ask my AI assistant?

"hover" is the scaffold default, so it is in most SvelteKit apps, whoever wrote the code. The question is what it costs on your pages. Here it is measured, and the pack gives your assistant the scoping rules plus a script that counts the loads on your own app.

Preloading makes SvelteKit feel fast. Should I turn it off?

No. Keep hover on navigation. With a 300 ms load, the page appeared after 95 ms with hover (after a 300 ms rest) vs 407 ms with preloading off. Scope it on lists, where one page view can start many loads.

Is 13 loads per page view normal?

It is one scripted path: resting on 12 rows of a list, then opening one. It is not an average of real users. Per 1,000 visitors who follow that path, that is 13,000 server loads instead of 1,000, under that stated assumption.

Google renders JavaScript. Why care about streaming?

Agreed for Google. But readers that strip scripts and browsers with JavaScript off see the placeholder. And a <svelte:head> that awaits streamed data rendered no <title> and no meta description in the served HTML (without experimental async SSR).

Isn't this in the SvelteKit docs?

Both options are documented, and I quote the docs in the guide. What I add: the measured cost on realistic pointer paths, the swipe case on phones, the one-slot cache, the latency ceiling, the head and meta consequence, and the gzip trap with vite preview.

When can I buy it?

Sales open soon. The waitlist hears first: one email when it opens, and the free SvelteKit defaults checklist right after you confirm.