After this holiday season, many of us would like to lose a little weight, page weight that is. In my CodeTriage, I make extensive use of SVG elements for images, the logo, and icons. Until recently, I̵;ve been rendering the SVG elements directly in the . This was the easiest thing to do. As you might guess by my intro sentence, I’ve been working on decreasing page weight by removing SVG elements from the . How well did it work? Before making changes the homepage was 14kb (77kb unzipped). After the change, the homepage is 6kb (30kb unzipped). That’s a 57% reduction in "over the wire" bytes per page load. What exactly did I do, and what were the trade-offs I made to get to a smaller page? Let’s look at how I was previously using SVG.

Here’s the raw SVG:



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here