Skip to content

perf(landing): self-host fonts, one analytics and smaller thumbs - #234

Merged
gnacho merged 1 commit into
mainfrom
fix/233-page-weight
Oct 28, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/233-page-weight

Conversation

@gnacho

@gnacho gnacho commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Problem

The landing weighed 220 KB across 14 requests on a 360 px viewport, with 102 KB of that being web fonts pulled from Google Fonts (Inter with optical sizing plus italic, JetBrains Mono), 10 KB of Google CSS, and two analytics scripts loading on every visit.

Changes

  • landing/assets/fonts/: Inter latin (48 KB) and JetBrains Mono latin (31 KB) as WOFF2, with their OFL licences. The variable instances drop the optical size axis and italics, none of which the page uses.
  • landing/styles.css: @font-face for both families with font-display: swap and latin unicode-range. Below 861 px, code uses the system monospace stack so phones never download the mono.
  • landing/index.html: Google Fonts link and both preconnect hints removed, a preload for the Inter file added, and the GoatCounter script removed. Umami stays. Cache-bust to ?v=8.
  • landing/app.js: slider thumbnails declare 96x64 and decode asynchronously.
  • landing/styles.css: header link gap and padding trimmed by a few pixels, which keeps the desktop nav at 63 px in one row instead of wrapping to 84 px once the narrower self-hosted Inter is used.

Verification

Measured at 360x740 dpr2 against production:

Before After
Weight 220 KB 147 KB
Requests 14 10
FCP 316 ms 236 ms

Playwright suites against production: 219/219 checks (54 page weight, 55 header and hero, 62 install section, 48 slider). No console errors, no horizontal overflow at 360, 390, 414, 1280 or 1440 px. Desktop nav is 63 px in one row at 1000, 1100, 1200, 1280 and 1440 px.

The nginx virtual host for this site had font-src https://fonts.gstatic.com, which blocked the self-hosted files. It now uses font-src 'self' and no longer allows fonts.googleapis.com in style-src. Changed with a backup and a validated reload.

Already deployed to https://nextsync.cloudless.club/ and verified there.

Closes #233

@gnacho
gnacho merged commit 0f981c7 into main Oct 28, 2026
2 checks passed
@gnacho
gnacho deleted the fix/233-page-weight branch October 28, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

landing: cut mobile page weight (self-hosted fonts, one analytics, thumb sizing)

1 participant