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