forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <ferdin...@apache.org>
Subject Re: native SVG
Date Sun, 19 Mar 2006 11:49:19 GMT

Paul Bolger wrote:

> I was talking about Forrest being able to churn
> out native SVG when the users' browser supports it. Firefox 1.5 is the
> first browser to support SVG natively - it'd be great if Forrest could
> take advantage of that.

Perhaps using the HTML object element would help here:

<object data="myimage.svg" type="image/svg-xml">
 <img src="myimage.png">
</object>

If the browser is able to process svg it will request the svg-version,
all others will fall back to the png-version.

In dynamic mode that should work ok if the proper pipeline for svg is
present, in static mode things might get tricky. Although I would
think that Forrest will actually see both links and render/copy the
appropriate files to the static site.

Another option I can think of would be a dynamic replacement of the
png-image with the svg-version on loading a page. The JavaScript would
detect the browser and change the image-file reference.

Some testing required to figure out where to place the code so that it
gets executed before the browser actually pull the wrong file.

--
Ferdinand Soethe


Mime
View raw message