Skip to content

Docs homepage loads 25 external badge images, compounding network latency #1085

Description

@audreyfeldroy

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

  1. Remove badges from docs homepage. Keep the logo, tagline, and content. The badges remain in the README where GitHub caches them.
  2. Add loading="lazy" to badge images so the page renders before badges arrive.
  3. Move badges below the fold so they don't block initial render.

I'm torn about what to do here. Maybe 3 to start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions