[Wylug-help] Embedding SVG directly in XHTML (Viewing in Firefox 3)

Dave Fisher wylug-help at davefisher.co.uk
Sat Aug 9 17:33:30 BST 2008


On Sat, Aug 09, 2008 at 01:04:58PM +0100, Smylers wrote:
> That's misleading.  What you actually need to do is serve the page as
> XHTML -- that is with a media type of application/xml+xhtml (rather than
> text/html, which is used for HTML).

I hadn't actually uploaded the file to a webserver, but I had used the
correct media type via the meta (http-equiv) element.


> And it's a little harsh to deem labelling your content correctly as
> jumping through a hoop!
> 
> >   1. Set file extension to .xhtml
> 
> It sounds like your web server was already configured to label .html as
> text/html and .xhtml as application/xml+xhtml, so the above happened to
> work for you.  But it's the media types that are important, not the
> extension.

I haven't tested it with the correct HTTP header, but I can assure you
that it doesn't work as simple file *unless* you give the .xhtml
extension.

Dave





More information about the Wylug-help mailing list