Better HN
topnewbestaskshowjobs
Log inSign up

prutya

7 karma · joined Jul 29, 2024 (2y ago) · 2 submissions

Software Engineer https://www.prudkohliad.com/
Submissions

comment 2y ago · link · parent

That makes a lot of sense. If you use some client-side routing (e.g. Next.js), you might be fine, because the page does not reload during navigation. But if you don't, every HTML page will contain all the SVGs increasing the HTML size unnecessarily.

P.S. I actually went ahead and changed the implementation to a separate file on my website after I saw your comment :D

comment 2y ago · link · parent

Hey, I wrote a small blog post on <defs> and <use> and how to optimize icons using them: https://www.prudkohliad.com/articles/reuse-svg-icons-2023-08...