Google's SVGWeb Brings SVG Support to All Browsers
The open graphics format called scalable vector graphics (SVG), and the animation of it, has not seen much use on the web, despite becoming a W3C recommendation about 8 years ago. Why? Lack of support in Internet Explorer (please die!), of course. Did you really have to ask?
Thats right, the latest versions of all major browsers (Firefox, Safari, Chrome, Opera) have a high level of native support for displaying and interacting with SVG, but not Internet Explorer. To make matters worse, the recent Internet Explorer 8 still does not have any native support for it.
While it is possible to bring SVG support to IE by installing a third party plug-in, but that is never a good idea if your goal is to unobtrusively reach the most amount of users possible. Google, realizing the widespread installed user base of Flash (probably >95% of users), decided to basically implement SVG through Flash so that anyone who has Flash installed will be able to see and interact with SVG content.
The package, called SVGWeb, consists of some javascript and an SWF (Flash) file. Thankfully, this is not an API, and there is no custom language or function calls to use it . You simply put your SVG content in your page as you would normally would (in a perfect world), and include the JS library which will detect if the browser has native SVG support or not. If it has support, it will essentially do nothing special. If it doesn't (IE), SVGWeb will take over and use Flash.
With SVG, all your drawn objects (circle, line, square, etc.) become part of the document object model (DOM), just like any other HTML element like <div> or <table>. That means that they can be fully styled with CSS, and even better, they can be dynamically changed and respond to DOM events (click, mouseover, mousedown, etc) right in the page! Amazingly, the coders at Google found a way to convert your javascript that you wrote for the SVG objects sitting in the page, to the rendition of your SVG stuff running in the Flash viewport! In other words, your same javascript + SVG code will work in Firefox, Safari, and (finally!) Internet Explorer (provided the IE users have Flash installed).
Oh yeah, did I mention SVG content is search engine friendly? It is, being pure XML and thus text-based.
This open source library is fairly new and still in the alpha stage. As a result, there still may be some quirks that have to be worked out. But it looks very promising. You can look at examples or download it now at Google Code and begin using it today. The hope is that developers can begin using SVG with this library and be confident that there will be huge readability support for end users.


13 COMMENTS
posted by on: Feb 14, 2010 08:38am
Thanks Michael for the intro to SVGWeb. Looking at the examples at Google Code, I couldn't figure out how to display svg fonts in Internet Explorer. Using Font Squirrel, I created a SVG font kit which works fine in the other browsers other than Internet Explorer. Does anybody know how to add SVGWeb js to make the kits demo.html work in IE as well? Thanks,
posted by on: Jan 21, 2010 09:33am
http://debeissat.nicolas.free.fr/svg3d.php
posted by James McFarland (arrocharGeek) on: Sep 3, 2009 11:00pm
This is awesome, we at www.sunporch.com were originally using SVG, betting that Adobe's SVG viewer would become as ubiquitous as Acrobat Reader and/or Flash...in 2005, it stagnated, then died...then the Macromedia acquisition happened, and we figured it was dead forever, well perhaps it's back. :)
posted by mike on: Sep 4, 2009 07:12am
Nice - It's like Sifr for SVG... I think the problem with Microsoft is that they actually live on a different planet...
posted by on: Sep 4, 2009 11:06am
This is very exciting news indeed. Nice article - thanks for explaining so clearly.
posted by David JM Emmett on: Sep 4, 2009 11:34am
This is fantastic news - although it would have been better news if someone said that _all_ copies of Internet Explorer suddenly deleted themselves and replaced themselves with copies of Mozilla Firefox! But to Web 3.0 - SVG - who's the first to create a 3D JS API for SVG?
posted by Wim Mulder on: Sep 4, 2009 01:40pm
Not sure if I'll be using this, but good to know it's now easy to implement it across browsers. Thanks!
posted by on: Sep 5, 2009 05:56am
This is absolutely, breathtakingly awesome. Checking in from Safari, it is funny to compare the native rendering against the Flash rendering. Partly because Safari's native SVG support and javascript engine are speed demons, but also because Flash for Mac is slow. The Flash rendering works, but it's very pokey.
posted by Nathan Pitman on: Sep 5, 2009 06:56am
I haven't done any research but does this provide any new options for us in terms of support for non web typefaces online?
posted by Facebook User on: Sep 6, 2009 01:34am
I don't know if it provides a NEW option in terms of typefaces, but included in the project is support for "SVG Fonts" which can be seen at http://codinginparadise.org/projects/svgweb/samples/demo.html?svgIndex=14&svg.render.forceflash=true SVG Fonts are basically fonts defined in SVG (and thus XML). The fonts can be directly embedded in the SVG content. You can convert TrueType font files to SVG fonts as well: http://xmlgraphics.apache.org/batik/tools/font-converter.html
posted by stelt on: Sep 22, 2009 10:38am
Oct. 2-4 there's an SVG conference at the Google Campus, with a keynote about SVG Web. See http://svgopen.org
posted by best_internet_phone on: Nov 20, 2009 04:00pm
Just came and read, this is wow! I was seek from many blogs, but here is the best, I love it.
posted by VOIP_Phone_Review on: Nov 20, 2009 04:52pm
This is the great blog, I'm reading them for a while, thanks for the new posts!