Hacker News new | comments | show | ask | jobs | submit login

You only have problems if you try to switch to application/xhtml+xml, which is easy to solve: don't do that

if we were outputting HTML4, it might cause ∗genuine∗ problems - e.g. if you need XHTML in order to mix in MathML or SVG

.. to do which you must serve as application/xhtml+xml.

That said, I agree with his points. And personally I wish the browsers would relax the restrictions on when they will agree to render SVG. I see no good reason why they refuse to do svg in text/html mode, considering the exceptions they make for seemingly everything else.

"I see no good reason why they refuse to do svg in text/html mode"

This probably breaks major assumptions inside the browser engines. Rendering most image types is a one-and-done type deal, just setting up a few calls to libjpeg or libpng, but SVG actually has to be XML-parsed and rendered element by element on page load. To do it in text/html, you'd need to hook together the html parser with the XML parser with the image generator. That's a lot of work to break the rules!

Well, good point, but I can't imagine it would be that hard, and they'd have to do it anyway for HTML5, which does indeed support svg inside text/html.


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact