Technology News

Which SVG technique performs best for way too many icons?

Tyler Sticka digs in here in the best possible way: by making a test page and literally measuring performance. Maybe 1,000 icons is a little bit of an edge case, but hey, 250 rows of data with four icons in each gets you there. Tyler covers the nuances carefully in the post. The different techniques tested: inline <svg>, same-document sprite <symbol>s, external-document sprite <symbol>s, <img> with an external source, <img> with a data URL, <img> with a filter, <div> with a background-image of an external source, <div> with a background-image of a data URL, and a <div> with a mask. Phew! That’s a lot — and they are all useful techniques in their own right.

Which technique won? Inline <svg>, unless the SVGs are rather complex, then <img> is better. That’s what I would have put my money on. I’ve been on that train for a while now.

Direct Link →

Control Layout in a Multi-Directional Website
Useful Tips That Can Help You Streamline Business Processes

Related Articles

The Mobile Performance Inequality Gap

the-mobile-performance-inequality-gap
An update on phones, networks, browsers, and the new baseline scenario for web performance. March 7, 2021 TL;DR: A lot has changed since 2017 when we last estimated a global…

Best Holiday Season SaaS Deals

Best Holiday Season SaaS Deals
Introduction The holiday season has begun! With that comes many treats and gifts for all! Our favorite SaaS companies have also chosen this time to give back to their users…

5 Ideas for Keeping Your Livestream Audience Engaged

5 Ideas for Keeping Your Livestream Audience Engaged
You already know that the COVID-19 pandemic has completely disrupted business as usual for practically every sector of the economy. Whether you’re an online entrepreneur, content creator, a growing business,…

Reimagine Atomic CSS

reimagine-atomic-css
I’m not the biggest fan of Atomic CSS myself. I don’t like all the classes. I like to express my styles in CSS because I find CSS… good. But I…