Our system loads SVG files programmatically into HTML via AJAX. A typical SVG file begins with:
Even easier, put an id in your svg then :
document.getElementById("your_id").getAttribute("viewBox");