3 ms·
All other things being equal, pure CSS could be a superior alternative to SVG / font icon if your SVG / font icons are loaded via HTTP (this is usually the case
by jdauriemma 10y ago
All other things being equal, pure CSS could be a superior alternative to SVG / font icon if your SVG / font icons are loaded via HTTP (this is usually the case with SVG and always the case with font icons). Reducing the number of requests is associated with better performance and user experience.
- oftenwrong 10y agoYou can avoid the separate request by inlining the SVG or using a data URI
- phkahler 10y agoI haven't done web stuff in 15+ years. Isn't there the equivalent of a compiler to produce a more static page, which would handle things like putting SVGs inline? Or the ability to create a library (like CSS) where there would only be a single reference to all the reusable components of a page, which may in turn be "compiled" from individual source files?
- jdauriemma 10y agoI think the webpack ecosystem has a lot of plugins for inlining.