Problem
The docs homepage (docs/index.md) loads 25 external images from 6 different domains (img.shields.io, codecov.io, static.pepy.tech, custom-icon-badges.demolab.com, raw.githubusercontent.com). Each domain requires its own DNS lookup, TCP connection, and TLS handshake.
On connections with moderate latency (common in Southeast Asia, South America, Africa), this creates a waterfall that can take 20-30 seconds to fully render. The HTML itself is only 60KB, but the browser blocks on cross-origin fetches.
These badges are inherited from the README, where they serve a purpose (GitHub renders and caches them server-side). The docs homepage doesn't need them: readers already found the docs, they don't need CI status, download counts, or platform badges to decide whether to keep reading.
External image sources
img.shields.io (14 badges)
static.pepy.tech (3 badges)
custom-icon-badges.demolab.com (1 badge)
codecov.io (1 badge)
raw.githubusercontent.com (1 logo)
Options
- Remove badges from docs homepage. Keep the logo, tagline, and content. The badges remain in the README where GitHub caches them.
- Add
loading="lazy" to badge images so the page renders before badges arrive.
- Move badges below the fold so they don't block initial render.
I'm torn about what to do here. Maybe 3 to start.
Problem
The docs homepage (
docs/index.md) loads 25 external images from 6 different domains (img.shields.io, codecov.io, static.pepy.tech, custom-icon-badges.demolab.com, raw.githubusercontent.com). Each domain requires its own DNS lookup, TCP connection, and TLS handshake.On connections with moderate latency (common in Southeast Asia, South America, Africa), this creates a waterfall that can take 20-30 seconds to fully render. The HTML itself is only 60KB, but the browser blocks on cross-origin fetches.
These badges are inherited from the README, where they serve a purpose (GitHub renders and caches them server-side). The docs homepage doesn't need them: readers already found the docs, they don't need CI status, download counts, or platform badges to decide whether to keep reading.
External image sources
img.shields.io(14 badges)static.pepy.tech(3 badges)custom-icon-badges.demolab.com(1 badge)codecov.io(1 badge)raw.githubusercontent.com(1 logo)Options
loading="lazy"to badge images so the page renders before badges arrive.I'm torn about what to do here. Maybe 3 to start.