Notes about Adobe SVG Viewer and Safari
Posted by Antoine Quint apropos on Sat Jan 8th, 2005 at 23:32:51 BST
Doug recently asked me on the SVG IRC channel about my experience with Adobe SVG Viewer and Apple's browser Safari. I briefly told him that everything was basically working just fine. In this diary entry, which I'll update if need be, I intend to list all that I have found out in using the Adobe SVG Viewer and Safari together.
First off, I think it is important to note that Adobe SVG Viewer 3 is not officially supported when used in conjunction with Safari. That isn't surprising given that the Adobe plug-in actually predates Safari. The reason it works with Safari is because Safari is compatible with the Netscape plug-in APIs. Basically, ASV is untested in this environment, which explains a few polishing issues described below. It is also worth noting that recently, Adobe, through Jon Ferraiolo, informally said in various forums that upcoming versions of ASV will support Safari.
I very rarely use SVG with HTML, so I can't really comment about how cross-scripting between HTML and SVG works in Safari nor can I say if using the Safari JavaScript engine, advertised as the most efficient on the Mac, is possible with ASV. However, most of the SVG content I write contains scripting and I always explicitly tell the SVG user agent, in case it is ASV, to use its internal scripting engine (Mozilla Foundation's SpiderMonkey). When doing so, all my scripting works fine and I never found any scripting-related discrepancy when viewing this content on any other supported platform of ASV.
My number one annoyance when using ASV with Safari is that local SVG and gzip-compressed SVG files cannot be opened in Safari using the basic technique of double-clicking or hitting the command-O keyboard shortcut. My understanding of this situation is that ASV is only triggered by Safari when Safari sees files served to it with one of the SVG mime-types recognized by ASV (image/svg+xml, image/svg-xml and image/vnd.adobe.svg+xml according to what the Safari "Help > Installed Plug-Ins" menu yields). When a local file is opened by one of the ways described above, it doesn't look like any mime-type information is sent to Safari.
One way to fix this is to use a local web server as a proxy when opening files. Since Mac OS X is shipped with Apache httpd on it, I guess it wouldn't be too much work to do that. Personally, I never really bothered to take any action in solving this issue since my SVG content is always standalone and the HTML user agent hosting ASV doesn't bring me additional value. So I have asked Mac OS X to open local SVG files with Mac Internet Explorer, which is officially supported by Adobe and works just fine.
Another annoyance is that when you access an SVG file in Safari from a link that you activated asking for it to be displayed in a new tab, then it seems the ASV viewport is restricted to a small square about 100 pixels wide. Depending on the SVG code and its preserveAspectRatio attribute on the root element, the result is either a very small scaled version of the SVG file requested, or a clipped version of it. Manually opening a new tab in Safari and then accessing an SVG file in this tab does not have this behavior and everything works as expected. Same goes when opening SVG files in a new window.
- Create an account
- About SVG.org
- Frequently Asked Questions
- SVG.org Content with RSS

- Get SVG Help on IRC
- SVG.Open Conferences
- SVG Phones (169 and counting)
- JSR 226 Phones (28 and counting)
