Spunk Autos

Websites and web tools

Icon sets speed test: measure before you choose

Icons look small, but the way you deliver them can add a large file, a font request or extra layout shift. This page explains the four common delivery methods and gives a repeatable test you can run on your own shop or dealer site, rather than relying on anyone's published numbers.

Four ways to deliver icons

MethodHow it worksMain speed risk
Inline SVGIcon markup sits in the HTMLHTML grows with every icon on the page
SVG spriteOne file holds many symbols, used with useOne extra request; may load unused icons
Icon fontGlyphs in a web font, shown with CSS classesWhole font downloads; icons blink in late
PNG or WebP filesOne image per iconMany requests; blurry when scaled

The test method

  1. Build a test page with the icons you actually use, such as phone, map pin, calendar, wrench and tire.
  2. Make one version per delivery method, with the same layout.
  3. Open dev tools, turn off the cache, and set network throttling to a slow mobile profile.
  4. Record transfer size for HTML, CSS, fonts and images in the Network panel.
  5. Run a performance trace and note when icons first appear and whether layout shifts.
  6. Repeat each run three times and use the middle value.

A worked size comparison

Suppose your page shows 40 icons and each inline SVG is about 600 bytes. That adds 24,000 bytes, about 23.4 KB, to the HTML before compression. Now suppose an icon font file is 150 KB and contains hundreds of glyphs, but you only use 20 of them. You pay 7.5 KB per icon you actually show. In that case inline SVG or a trimmed sprite wins clearly. With your own files the numbers will differ, which is why you measure.

Reading the results

  • Transfer size: smaller is better, but compressed size is what counts on the wire.
  • Request count: matters less over HTTP/2 than it once did, yet each request still has a cost.
  • Time to visible icons: font icons can show blank boxes or letters until the font arrives.
  • Layout shift: icons without set width and height can push text around as they load.
  • Repeat visits: a cached sprite or font costs nothing the second time; inline SVG is downloaded with every page.

Practical choices for small sites

For a site with a dozen icons, inline SVG with fixed width and height attributes is simple and fast. For a large site that repeats the same icons on many pages, an external sprite file can be cached across visits. If you keep an icon font, subset it to the glyphs you use. Whatever you choose, give each icon an accessible name or mark it decorative with aria-hidden.