摘要 |
Disclosed is a method for automatically determining whether a browser supports scalable vector graphics ("SVG"). The method for automatically determining whether a browser supports SVG according to embodiments of the present invention uses a two prong process in an attempt to make a proper detection for various types of browsers. In preferred embodiments, the method includes the steps of using JavaScript to detect Multipurpose Internet Mail Extensions ("MIME") types from the browser to detect SVG support. If scanning of the MIME types detects that SVG support is present, the version of the requested web page containing SVG content is sent. If no SVG support is detected in the returned MIME types, the non-SVG version of the web page is sent to the browser. In the event that the browser does not return a list of MIME types, the method further comprises using Visual Basic Scripting Edition language ("VBScript") to instruct the browser to create an SVG object on the client device. If the object is created successfully, then SVG support has been detected and the browser is served a version of the web page having SVG content. In alternative embodiments, the method includes using JavaScript to request from the browser a list of its available plug-ins, and scanning a returned plug-in list to determine whether SVG is supported.
|