[IPOL discuss] Vector graphics on IPOL: which format to use?

Pascal Getreuer getreuer at gmail.com
Mon Jul 4 11:03:44 CEST 2011


Dear Miguel,

That is excellent!  The object tag really improves the situation.  I
had the chance now to try the page with several other browsers.

With IE 8.0.6001.19019: there is no SVG support, neither the SVG nor
SVG object embed, and even going directly to
http://dev.ipol.im/~colom/images/image.svg does not display the SVG.
However, the PDF object does embed successfully (PDF is thanks to
Adobe plugin).

With Firefox 3.6.17: although the SVG does not embed, the SVG object
embeds perfectly, and neither the PDF nor PDF object embed.  However,
I tested this one without the Adobe plugin---the PDF results might be
better with it.

With Firefox 5.0: PNG, SVG, SVG object, and PDF object embed correctly
(PDF is thanks to Adobe plugin).  A broken image icon is shown for the
PDF without object.

With Opera 11.01: Same results as in Firefox 5.0.

With Konqueror 4.5.5: the SVG object is embedded, but the clipping is
wrong.  It does actually handle the PDF object embedding correctly
(there is however a graphical problem with scrolling).


We see that support for embedding of SVG objects is pretty good, the
only failures in this test being IE8 (no SVG support) and Konqueror
(wrong SVG clipping).  Actually, we also see that PDF object embedding
is excellent, all browsers here except Firefox 3.6.17 managed to do it
(and with Firefox 3.6.17 I did not have the Adobe plugin).

According to [1], the browser market share as of June 2011 is

IE9                  6.18%
IE8               27.67%
IE7                  6.00%
IE6                  3.72%
Firefox 5.0       2.81%
Firefox 4.0     14.04%
Firefox 3.5+   10.44%	
Firefox 3.1-      1.05%
Chrome         20.67%
Safari              5.07%	
Opera              1.74%
Others             0.61%

IE8, IE7, IE6 add up to 37.39%, so more than 1 out of 3 web users have
no SVG support, but they might have PDF object embedding (at least,
they do with IE8 and the Adobe plugin).  Of course, statistics will be
different on IPOL compared to the web at large, but this is
representative.

> Regarding the choice, I think we should use something that has some
> future. And SVG is the way to go. Old browsers will disappear sooner
> or later, maybe we could just add a fallback option for that browsers.
> Is this possible?

The statistics above show that IE9 adoption is unfortunately slow, it
doesn't look like IE8 is disappearing any time soon.  I would say PDF
has a future, and it is to continue to represent printed pages.  SVG
is undeniably more appropriate for the web.

I do like the idea of detecting old browsers and going with a
fallback.  Maybe the demo system could first determine the browser,
then set an "SVG supported" flag if the browser is known to support
SVG.  The demo would generate an SVG, and if the "SVG supported" flag
is not set, use for example ImageMagick's "convert" program to
rasterize to PNG.  The results page would then show depending on the
flag either the PNG or the SVG as an embedded SVG object.

I hear that browser detection is messy, so determining whether the
client's browser supports SVG might in itself be another technical
challenge.  Does anyone know how to do it?

[1] http://www.sitepoint.com/1-in-5-use-chrome-browser-trends-july-2011/


Best,
Pascal


More information about the discuss mailing list