Checking to see if SVG is supported


I’m using jQuery SVG and would like to check if the browser that the person is using will support SVG — if not, they’ll receive a polite message; is there anyway to check this using javascript?

Thank you,


Which SVG wrapper are you using for jQuery, perhaps it has built in detection?

You could also use the hasFeature function to detect support, but I’m not really sure about cross browser compatibility:

if (!document.implementation.hasFeature("", "1.0")) {
    alert('Oops, your browser doesn't support svg');

Thanks for the quick reply!