Home > Articles

Viewing SVG

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Hour 3: Viewing SVG

Now that you've seen the different elements of SVG, you're probably excited to see what this stuff looks like in the real world. Before viewing your SVG files, though, you will need to know the realities of viewing SVG content today.

This chapter will address a variety of issues regarding how you view SVG, such as:

  • How to view SVG content

  • What types of SVG viewers are on the market

  • What MIME types your Web server should use to host your SVG documents

  • How to embed an SVG document within an HTML document

Although this chapter will not cover every possible method of viewing SVG content, it will review the most common, and hint at some of the soon-to-be exciting, methods available.

Understanding Limitations

The means of viewing SVG content is often through using a browser accompanied by a viewer plug-in. Although this obviously extends the potential audience for viewing your content, plug-in viewing (of any content, SVG or otherwise) does not offer the same experience as native viewing. Each plug-in has its limitations, and, as you will see from examples in this book and from your own experience, they may limit the possibilities of what your SVG content can do.

For instance, many of the viewers in distribution over the past two years have supported only a portion of the W3C specification. This was due, in large part, to the state of flux of the specification, as well as to the need for timeliness in releasing a product for developers' use. This does mean, however, that what works in one viewer may not work in another.

Although this is usually not a news flash for anyone who has dealt with computer technology over the past several years, and more specifically Web technology, it is important to note. Before releasing SVG on a wide scale, you will want to test your content against the various viewers available. As of this writing, there is no one viewer that offers 100% support for the entire W3C recommendation.

Aside from feature support, there are also issues of performance. The Adobe SVG Viewer is noticeably sluggish when dealing with animations (especially animations involving filters), and also ties up the bulk of your computer's processing cycles. Do not let these current issues deter your development, though. Later hours in this book will talk about optimizing your code so that you can circumvent many difficulties inherent in today's viewers. Also, today's viewers are just that—today's viewers. With enough development, more viewers will continue to be released until complete specification support and optimal performance are reached. Your efforts, therefore, have a significant impact on how well your SVG content is viewed in both the present and future.

  • + Share This
  • 🔖 Save To Your Account