Join the Mozilla’s Test Days event from Dec 2–8 to test the new Firefox address bar on Firefox Beta 134 and get a chance to win Mozilla swag vouchers! 🎁

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

svg loading not working

more options

Hi there,

I have a CGI script that contains inline svg and jQuery date picker.

When I use application/xhtml+xml header, it load everything fine, but date picker doesn't work on IE9. So I changed it to text/html, it works in IE9 but firefox 3.6 fails to display inline svg even though I use . But firefox 4.0b12 works fine with this heading. Could someone help me with this and how to make my inline svg displayed on firefox 3.6 and compatible with IE9? what's the difference between 4.0b12 and 3.6.14 with regard to the treatment of inline SVG? Thanks for your kind help! Cheers, Peter

Hi there, I have a CGI script that contains inline svg and jQuery date picker. When I use application/xhtml+xml header, it load everything fine, but date picker doesn't work on IE9. So I changed it to text/html, it works in IE9 but firefox 3.6 fails to display inline svg even though I use <html xmlns="http://www.w3.org/1999/xhtml">. But firefox 4.0b12 works fine with this heading. Could someone help me with this and how to make my inline svg displayed on firefox 3.6 and compatible with IE9? what's the difference between 4.0b12 and 3.6.14 with regard to the treatment of inline SVG? Thanks for your kind help! Cheers, Peter

All Replies (1)

more options

Support for inline SVG in text/html was only added in FF4, so you'll need to use application/xhtml+xml if you want that to work in FF3.6.

If you must use text/html then one possible solution for 3.6 is to use a script to parse the SVG using https://developer.mozilla.org/en/DOM/DOMParser and then insert the result into the DOM of the text/html page.