Send SVG to server

Using javascript, I ended up just parsing my svg html as a string and sending it with my post data.

var svg = document.getElementsByTagName('svg')[0];
var xml = (new XMLSerializer()).serializeToString(svg);

Include it in your post data and send it to the server…

Written on June 2, 2014