News for hackers. Stuff that matters.

prutya

Re:SVG Triangle of Compromise on Tuesday July 30, 2024 @11:31AM (#41110136)
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

Re:SVG Triangle of Compromise on Monday July 29, 2024 @10:25AM (#41100720)
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...