JohnSundell/swiftbysundell-beta-feedback

Data URL those SVGs

Closed this issue · 2 comments

garza commented

Love the new site look and saw the mentions about web performance on twitter. I noticed the svgs used are for the small icons on the page. Have you considered using inline SVGs in CSS to further reduce the number of network requests required to render the page?

Thanks a lot for the suggestion, it's something that I'm considering before release. The downside is that it makes the CSS heavier even for pages that don't use the icons, but I'm definitely going to experiment with this and see if it can further improve performance 👍

After investigating this, the only SVG that I considered worth inlining was the highlight icon for search. The other ones would only give me really marginal performance improvements, and sometimes even performance regressions. Closing this as fixed ✅