You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use React (next.js) and FontAwesome. I use the SVG + JS method and load icons via the react component.
Say i have the same icon on 100 places on the same page. When I just view source i see the same SVG code again and again and again.
Is this an issue? Or are various compression (like gzip) and so on taking care of this on the wire? It seems the bytes sent over the wire is significantly higher because of the same icons on multiple places.
Should i use a SVG sprite or something for the most used icons instead? Or am i over thinking this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use React (next.js) and FontAwesome. I use the SVG + JS method and load icons via the react component.
Say i have the same icon on 100 places on the same page. When I just view source i see the same SVG code again and again and again.
Is this an issue? Or are various compression (like gzip) and so on taking care of this on the wire? It seems the bytes sent over the wire is significantly higher because of the same icons on multiple places.
Should i use a SVG sprite or something for the most used icons instead? Or am i over thinking this?
Beta Was this translation helpful? Give feedback.
All reactions