3 ms·
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 ∗genu
by sailormoon 17y ago
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.
- rabidgnat 17y ago"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!
- sailormoon 17y agoWell, 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. http://www.whatwg.org/specs/web-apps/current-work/#svg-0 http://www.whatwg.org/specs/web-apps/current-work/#svg-0