this is really a JavaScript question, not a Go question, so it doesn't really belong on this list. But I'll answer it because I've done this before and I'm not
that much of a jerk that I would just tell you to go away.
I was able to solve the problem of rendering the svgs at runtime by rendering the svg to the page with raphael.js. Raphael doesn't support it natively, but there's an extension called raphael-svg-import that adds this capability (
https://github.com/wout/raphael-svg-import/). It works well and is quite fast.
What I did was download all of the svgs on The Noun Project, stick them all in Redis, and then created a REST API that exposed them. I wrote this before Go1, so it probably doesn't work any more, but there's an example use of this technique here:
and you probably want to use mustache.js to place the actual tag or modify the attributes of the tag before inserting it into the DOM.
I haven't sent the svg data through a websocket, but it's just text, so it shouldn't change anything.