WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C.
WebSocket is distinct from HTTP. Both protocols are located at layer 7 in the OSI model and depend on TCP at layer 4. Although they are different, RFC 6455
states that WebSocket "is designed to work over HTTP ports 80 and 443
as well as to support HTTP proxies and intermediaries," thus making it
compatible with the HTTP protocol. To achieve compatibility, the
WebSocket handshake uses the HTTP Upgrade header to change from the HTTP protocol to the WebSocket protocol.
The WebSocket protocol enables interaction between a web browser (or other client application) and a web server
with lower overhead than half-duplex alternatives such as HTTP polling,
facilitating real-time data transfer from and to the server. This is
made possible by providing a standardized way for the server to send
content to the client without being first requested by the client, and
allowing messages to be passed back and forth while keeping the
connection open. In this way, a two-way ongoing conversation can take
place between the client and the server. The communications are done
over TCP port number 80 (or 443 in the case of TLS-encrypted connections), which is of benefit for those environments which block non-web Internet connections using a firewall. Similar two-way browser-server communications have been achieved in non-standardized ways using stopgap technologies such as Comet.
Unlike HTTP, WebSocket provides full-duplex communication.
Additionally, WebSocket enables streams of messages on top of TCP. TCP
alone deals with streams of bytes with no inherent concept of a message.
Before WebSocket, port 80 full-duplex communication was attainable
using Comet
channels; however, Comet implementation is nontrivial, and due to the
TCP handshake and HTTP header overhead, it is inefficient for small
messages. The WebSocket protocol aims to solve these problems without
compromising the security assumptions of the web.
The WebSocket protocol specification defines ws (WebSocket) and wss (WebSocket Secure) as two new uniform resource identifier (URI) schemes that are used for unencrypted and encrypted connections, respectively. Apart from the scheme name and fragment (i.e. # is not supported), the rest of the URI components are defined to use URI generic syntax.
Using browser developer tools, developers can inspect the WebSocket handshake as well as the WebSocket frames.
History
WebSocket was first referenced as TCPConnection in the HTML5 specification, as a placeholder for a TCP-based socket API. In June 2008, a series of discussions were led by Michael Carter that resulted in the first version of the protocol known as WebSocket.
The name "WebSocket" was coined by Ian Hickson and Michael Carter
shortly thereafter through collaboration on the #whatwg IRC chat room,
and subsequently authored for inclusion in the HTML5 specification by
Ian Hickson, and announced on the cometdaily blog by Michael Carter.
In December 2009, Google Chrome 4 was the first browser to ship full
support for the standard, with WebSocket enabled by default. Development of the WebSocket protocol was subsequently moved from the W3C and WHATWG group to the IETF in February 2010, and authored for two revisions under Ian Hickson.
After the protocol was shipped and enabled by default in multiple
browsers, the RFC was finalized under Ian Fette in December 2011.
Browser implementation
A secure version of the WebSocket protocol is implemented in Firefox 6, Safari 6, Google Chrome 14, Opera 12.10 and Internet Explorer 10. A detailed protocol test suite report lists the conformance of those browsers to specific protocol aspects.
An older, less secure version of the protocol was implemented in Opera 11 and Safari 5, as well as the mobile version of Safari in iOS 4.2. The BlackBerry Browser in OS7 implements WebSockets. Because of vulnerabilities, it was disabled in Firefox 4 and 5, and Opera 11.
Nginx has supported WebSockets since 2013, implemented in version 1.3.13 including acting as a reverse proxy and load balancer of WebSocket applications.
Protocol handshake
To
establish a WebSocket connection, the client sends a WebSocket
handshake request, for which the server returns a WebSocket handshake
response, as shown in the example below.
Client request (just like in HTTP, each line ends with \r\n and there must be an extra blank line at the end):
The handshake starts with an HTTP request/response, allowing servers
to handle HTTP connections as well as WebSocket connections on the same
port. Once the connection is established, communication switches to a
bidirectional binary protocol which does not conform to the HTTP
protocol.
In addition to Upgrade headers, the client sends a Sec-WebSocket-Key header containing base64-encoded random bytes, and the server replies with a hash of the key in the Sec-WebSocket-Accept header. This is intended to prevent a cachingproxy from re-sending a previous WebSocket conversation, and does not provide any authentication, privacy, or integrity. The hashing function appends the fixed string 258EAFA5-E914-47DA-95CA-C5AB0DC85B11 (a GUID) to the value from Sec-WebSocket-Key header (which is not decoded from base64), applies the SHA-1 hashing function, and encodes the result using base64.
Once the connection is established, the client and server can send WebSocket data or text frames back and forth in full-duplex mode. The data is minimally framed, with a small header followed by payload.[35]
WebSocket transmissions are described as "messages", where a single
message can optionally be split across several data frames. This can
allow for sending of messages where initial data is available but the
complete length of the message is unknown (it sends one data frame after
another until the end is reached and marked with the FIN bit). With
extensions to the protocol, this can also be used for multiplexing
several streams simultaneously (for instance to avoid monopolizing use
of a socket for a single large payload).
Security considerations
Unlike regular cross-domain HTTP requests, WebSocket requests are not restricted by the Same-origin policy.
Therefore WebSocket servers must validate the "Origin" header against
the expected origins during connection establishment, to avoid
Cross-Site WebSocket Hijacking attacks (similar to Cross-site request forgery),
which might be possible when the connection is authenticated with
Cookies or HTTP authentication. It is better to use tokens or similar
protection mechanisms to authenticate the WebSocket connection when
sensitive (private) data is being transferred over the WebSocket.
Proxy traversal
WebSocket protocol client implementations try to detect if the user agent is configured to use a proxy when connecting to destination host and port and, if it is, uses HTTP CONNECT method to set up a persistent tunnel.
While the WebSocket protocol itself is unaware of proxy servers
and firewalls, it features an HTTP-compatible handshake thus allowing
HTTP servers to share their default HTTP and HTTPS ports (80 and 443)
with a WebSocket gateway or server. The WebSocket protocol defines a
ws:// and wss:// prefix to indicate a WebSocket and a WebSocket Secure
connection, respectively. Both schemes use an HTTP upgrade mechanism
to upgrade to the WebSocket protocol. Some proxy servers are
transparent and work fine with WebSocket; others will prevent WebSocket
from working correctly, causing the connection to fail. In some cases,
additional proxy server configuration may be required, and certain proxy
servers may need to be upgraded to support WebSocket.
If unencrypted WebSocket traffic flows through an explicit or a
transparent proxy server without WebSockets support, the connection will
likely fail.
If an encrypted WebSocket connection is used, then the use of Transport Layer Security
(TLS) in the WebSocket Secure connection ensures that an HTTP CONNECT
command is issued when the browser is configured to use an explicit
proxy server. This sets up a tunnel, which provides low-level end-to-end
TCP communication through the HTTP proxy, between the WebSocket Secure
client and the WebSocket server. In the case of transparent proxy
servers, the browser is unaware of the proxy server, so no HTTP CONNECT
is sent. However, since the wire traffic is encrypted, intermediate
transparent proxy servers may simply allow the encrypted traffic
through, so there is a much better chance that the WebSocket connection
will succeed if WebSocket Secure is used. Using encryption is not free
of resource cost, but often provides the highest success rate since it
would be travelling through a secure tunnel.
A mid-2010 draft (version hixie-76) broke compatibility with reverse proxies and gateways by including eight bytes of key data after the headers, but not advertising that data in a Content-Length: 8 header. This data was not forwarded by all intermediates, which could lead to protocol failure. More recent drafts (e.g., hybi-09) put the key data in a Sec-WebSocket-Key header, solving this problem.
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and currently led by Sir Tim Berners-Lee, the consortium is made up of member organizations which maintain full-time staff working together in the development of standards for the World Wide Web. As of 21 October 2019, the World Wide Web Consortium (W3C) has 443 members.
The consortium also engages in education and outreach, develops
software and serves as an open forum for discussion about the Web.
The organization tries to foster compatibility and agreement
among industry members in the adoption of new standards defined by the
W3C. Incompatible versions of HTML are offered by different vendors,
causing inconsistency in how web pages are displayed. The consortium
tries to get all those vendors to implement a set of core principles and
components which are chosen by the consortium.
It was originally intended that CERN host the European branch of
W3C; however, CERN wished to focus on particle physics, not information
technology. In April 1995, the French Institute for Research in Computer Science and Automation (INRIA) became the European host of W3C, with Keio University Research Institute at SFC (KRIS) becoming the Asian host in September 1996.
Starting in 1997, W3C created regional offices around the world. As of
September 2009, it had eighteen World Offices covering Australia, the
Benelux countries (Netherlands, Luxembourg, and Belgium), Brazil, China,
Finland, Germany, Austria, Greece, Hong Kong, Hungary, India, Israel,
Italy, South Korea, Morocco, South Africa, Spain, Sweden, and, as of
2016, the United Kingdom and Ireland.
In October 2012, W3C convened a community of major web players and publishers to establish a MediaWiki wiki that seeks to document open web standards called the WebPlatform and WebPlatform Docs.
Sometimes,
when a specification becomes too large, it is split into independent
modules which can mature at their own pace. Subsequent editions of a
module or specification are known as levels and are denoted by the first
integer in the title (e.g. CSS3 = Level 3). Subsequent revisions on
each level are denoted by an integer following a decimal point (for
example, CSS2.1 = Revision 1).
The W3C standard formation process is defined within the W3C
process document, outlining four maturity levels through which each new
standard or recommendation must progress.
Working draft (WD)
After
enough content has been gathered from 'editor drafts' and discussion,
it may be published as a working draft (WD) for review by the community.
A WD document is the first form of a standard that is publicly
available. Commentary by virtually anyone is accepted, though no
promises are made with regard to action on any particular element
commented upon.
At this stage, the standard document may have significant
differences from its final form. As such, anyone who implements WD
standards should be ready to significantly modify their implementations
as the standard matures.
Candidate recommendation (CR)
A
candidate recommendation is a version of a standard that is more mature
than the WD. At this point, the group responsible for the standard is
satisfied that the standard meets its goal. The purpose of the CR is to
elicit aid from the development community as to how implementable the
standard is.
The standard document may change further, but at this point,
significant features are mostly decided. The design of those features
can still change due to feedback from implementors.
Proposed recommendation (PR)
A
proposed recommendation is the version of a standard that has passed
the prior two levels. The users of the standard provide input. At this
stage, the document is submitted to the W3C Advisory Council for final
approval.
While this step is important, it rarely causes any significant changes to a standard as it passes to the next phase.
W3C recommendation (REC)
This
is the most mature stage of development. At this point, the standard
has undergone extensive review and testing, under both theoretical and
practical conditions. The standard is now endorsed by the W3C,
indicating its readiness for deployment to the public, and encouraging
more widespread support among implementors and authors.
Recommendations can sometimes be implemented incorrectly,
partially, or not at all, but many standards define two or more levels
of conformance that developers must follow if they wish to label their
product as W3C-compliant.
Later revisions
A
recommendation may be updated or extended by separately-published,
non-technical errata or editor drafts until sufficient substantial edits
accumulate for producing a new edition or level of the recommendation.
Additionally, the W3C publishes various kinds of informative notes which
are to be used as references.
Certification
Unlike the ISOC
and other international standards bodies, the W3C does not have a
certification program. The W3C has decided, for now, that it is not
suitable to start such a program, owing to the risk of creating more
drawbacks for the community than benefits.
The W3C has a staff team of 70–80 worldwide as of 2015. W3C is run by a management team which allocates resources and designs strategy, led by CEO Jeffrey Jaffe (as of March 2010), former CTO of Novell. It also includes an advisory board which supports in strategy and legal matters and helps resolve conflicts. The majority of standardization work is done by external experts in the W3C's various working groups.
Membership
The Consortium is governed by its membership. The list of members is available to the public. Members include businesses, nonprofit organizations, universities, governmental entities, and individuals.
Membership requirements are transparent except for one
requirement: An application for membership must be reviewed and approved
by the W3C. Many guidelines and requirements are stated in detail, but
there is no final guideline about the process or standards by which
membership might be finally approved or denied.
The cost of membership is given on a sliding scale, depending on
the character of the organization applying and the country in which it
is located. Countries are categorized by the World Bank's most recent grouping by GNI ("Gross National Income") per capita.
Criticism
In 2012 and 2013, the W3C started considering adding DRM-specific Encrypted Media Extensions
(EME) to HTML5, which was criticised as being against the openness,
interoperability, and vendor neutrality that distinguished websites
built using only W3C standards from those requiring proprietary plug-ins
like Flash.
On September 18, 2017, the W3C published the EME specification as a Recommendation, leading to the Electronic Frontier Foundation's resignation from W3C.
SVG images and their behaviors are defined in XML text files. This means that they can be searched, indexed, scripted, and compressed. As XML files, SVG images can be created and edited with any text editor, as well as with drawing software.
This
image illustrates the difference between bitmap and vector images. The
bitmap image is composed of a fixed set of pixels, while the vector
image is composed of a fixed set of shapes. In the picture, scaling the
bitmap reveals the pixels while scaling the vector image preserves the
shapes.
SVG has been in development within the World Wide Web Consortium
(W3C) since 1999 after six competing proposals for vector graphics
languages had been submitted to the consortium during 1998. The early
SVG Working Group decided not to develop any of the commercial
submissions, but to create a new markup language that was informed by
but not really based on any of them.
The SVG specification was updated to version 1.1 in 2011. There
are two 'Mobile SVG Profiles,' SVG Tiny and SVG Basic, meant for mobile devices with reduced computational and display capabilities. Scalable Vector Graphics 2 became a W3C Candidate Recommendation on 15 September 2016. SVG 2 incorporates several new features in addition to those of SVG 1.1 and SVG Tiny 1.2.
Printing
Though the SVG Specification primarily focuses on vector graphics markup language, its design includes the basic capabilities of a page description language like Adobe's PDF. It contains provisions for rich graphics, and is compatible with CSS for styling purposes. SVG has the information needed to place each glyph and image in a chosen location on a printed page.
Scripting and animation
SVG drawings can be dynamic and interactive. Time-based modifications to the elements can be described in SMIL, or can be programmed in a scripting language (e.g. ECMAScript or JavaScript). The W3C explicitly recommends SMIL as the standard for animation in SVG.
A rich set of event handlers such as "onmouseover" and "onclick" can be assigned to any SVG graphical object to apply actions and events.
Compression
SVG images, being XML, contain many repeated fragments of text, so they are well suited for lossless data compression algorithms. When an SVG image has been compressed with the gzip algorithm, it is referred to as an "SVGZ" image and uses the corresponding .svgz filename extension. Conforming SVG 1.1 viewers will display compressed images. An SVGZ file is typically 20 to 50 percent of the original size. W3C provides SVGZ files to test for conformance.
Development history
SVG was developed by the W3C SVG Working Group starting in 1998, after six competing vector graphics submissions were received that year:
SVG 1.1 became a W3C Recommendation on 14 January 2003.
The SVG 1.1 specification is modularized in order to allow subsets to
be defined as profiles. Apart from this, there is very little difference
between SVG 1.1 and SVG 1.0.
SVG Tiny and SVG Basic (the Mobile SVG Profiles) became W3C Recommendations on 14 January 2003. These are described as profiles of SVG 1.1.
SVG Tiny 1.2 became a W3C Recommendation on 22 December 2008. It was initially drafted as a profile of the planned SVG Full 1.2 (which has since been dropped in favor of SVG 2), but was later refactored as a standalone specification.
SVG 1.1 Second Edition, which includes all the errata and
clarifications, but no new features to the original SVG 1.1 was released
on 16 August 2011.
Version 2.x
SVG 2.0 removes or deprecates some features of SVG 1.1 and incorporates new features from HTML5 and Web Open Font Format:
For example, SVG 2.0 removes several font elements such as glyph and altGlyph (replaced by the WOFF font format).
The xml:space attribute is deprecated in favor of CSS.
HTML5 features such as translate and data-* attributes have been added.
It reached Candidate Recommendation stage on 15 September 2016. The latest draft was released on 23 September 2019.
Mobile profiles
Because of industry demand, two mobile profiles were introduced with SVG 1.1: SVG Tiny (SVGT) and SVG Basic (SVGB).
These are subsets of the full SVG standard, mainly intended for user agents with limited capabilities. In particular, SVG Tiny was defined for highly restricted mobile devices such as cellphones; it does not support styling or scripting. SVG Basic was defined for higher-level mobile devices, such as smartphones.
In 2003, the 3GPP,
an international telecommunications standards group, adopted SVG Tiny
as the mandatory vector graphics media format for next-generation
phones. SVGT is the required vector graphics format and support of SVGB
is optional for Multimedia Messaging Service (MMS) and Packet-switched Streaming Service. It was later added as required format for vector graphics in 3GPP IP Multimedia Subsystem (IMS).
Differences from non-mobile SVG
Neither
mobile profile includes support for the full Document Object Model
(DOM), while only SVG Basic has optional support for scripting, but
because they are fully compatible subsets of the full standard, most SVG
graphics can still be rendered by devices which only support the mobile
profiles.
SVGT 1.2 adds a microDOM (μDOM), styling and scripting.
Related work
The MPEG-4 Part 20 standard - Lightweight Application Scene Representation (LASeR) and Simple Aggregation Format (SAF) is based on SVG Tiny. It was developed by MPEG (ISO/IEC JTC1/SC29/WG11) and published as ISO/IEC 14496-20:2006.
SVG capabilities are enhanced in MPEG-4 Part 20 with key features for
mobile services, such as dynamic updates, binary encoding, state-of-art
font representation. SVG was also accommodated in MPEG-4 Part 11, in the Extensible MPEG-4 Textual (XMT) format - a textual representation of the MPEG-4 multimedia content using XML.
Functionality
The SVG 1.1 specification defines 14 functional areas or feature sets:
Paths
Simple or compound shape outlines are drawn with curved or straight lines that can be filled in, outlined, or used as a clipping path. Paths have a compact coding.
For example, M (for "move to") precedes initial numeric x and ycoordinates, and L (for "line to") precedes a point to which a line should be drawn. Further command letters (C, S, Q, T, and A) precede data that is used to draw various Bézier and elliptical curves. Z is used to close a path.
In all cases, absolute coordinates follow capital letter commands
and relative coordinates are used after the equivalent lower-case
letters.
Basic shapes
Straight-line paths and paths made up of a series of connected
straight-line segments (polylines), as well as closed polygons, circles,
and ellipses can be drawn. Rectangles and round-cornered rectangles are
also standard elements.
Text
Unicode character text included in an SVG file is expressed as XML
character data. Many visual effects are possible, and the SVG
specification automatically handles bidirectional text (for composing a
combination of English and Arabic text, for example), vertical text (as
Chinese was historically written) and characters along a curved path
(such as the text around the edge of the Great Seal of the United States).
Painting
SVG shapes can be filled and outlined (painted with a color, a
gradient, or a pattern). Fills may be opaque, or have any degree of
transparency.
"Markers" are line-end features, such as arrowheads, or symbols that can appear at the vertices of a polygon.
Color
Colors can be applied to all visible SVG elements, either directly or via fill, stroke, and other properties. Colors are specified in the same way as in CSS2, i.e. using names like black or blue, in hexadecimal such as #2f0 or #22ff00, in decimal like rgb(255,255,127), or as percentages of the form rgb(100%,100%,50%).
Gradients and patterns
SVG shapes can be filled or outlined with solid colors as above, or
with color gradients or with repeating patterns. Color gradients can be
linear or radial (circular), and can involve any number of colors as
well as repeats. Opacity gradients can also be specified. Patterns are
based on predefined raster or vector graphic objects, which can be
repeated in x and y directions. Gradients and patterns can be animated and scripted.
Since 2008, there has been discussion among professional users of SVG that either gradientmeshes or preferably diffusion curves
could usefully be added to the SVG specification. It is said that a
"simple representation [using diffusion curves] is capable of
representing even very subtle shading effects"
and that "Diffusion curve images are comparable both in quality and
coding efficiency with gradient meshes, but are simpler to create
(according to several artists who have used both tools), and can be
captured from bitmaps fully automatically." The current draft of SVG 2 includes gradient meshes.
Clipping, masking and compositing
Graphic elements, including text, paths, basic shapes and combinations of these, can be used as outlines to define both inside and outside regions that can be painted (with colors, gradients and patterns) independently. Fully opaque clipping paths and semi-transparent masks are composited together to calculate the color and opacity of every pixel of the final image, using alpha blending.
Filter effects
A filter effect consists of a series of graphics operations that are
applied to a given source vector graphic to produce a modified bitmapped result.
Interactivity
SVG images can interact with users in many ways. In addition to
hyperlinks as mentioned below, any part of an SVG image can be made
receptive to user interface events such as changes in focus,
mouse clicks, scrolling or zooming the image and other pointer,
keyboard and document events. Event handlers may start, stop or alter
animations as well as trigger scripts in response to such events.
Linking
SVG images can contain hyperlinks to other documents, using XLink. Through the use of the element or a fragment identifier, URLs
can link to SVG files that change the visible area of the document.
This allows for creating specific view states that are used to zoom
in/out of a specific area or to limit the view to a specific element.
This is helpful when creating sprites. XLink support in combination with the
element also allow linking to and re-using internal and external
elements. This allows coders to do more with less markup and makes for
cleaner code.
Scripting
All aspects of an SVG document can be accessed and manipulated using
scripts in a similar way to HTML. The default scripting language is ECMAScript (closely related to JavaScript) and there are defined Document Object Model (DOM) objects for every SVG element and attribute. Scripts are enclosed in elements. They can run in response to pointer events, keyboard events and document events as required.
Animation
SVG content can be animated using the built-in animation elements such as , and .
Content can be animated by manipulating the DOM using ECMAScript and
the scripting language's built-in timers. SVG animation has been
designed to be compatible with current and future versions of Synchronized Multimedia Integration Language (SMIL). Animations can be continuous, they can loop and repeat, and they can respond to user events, as mentioned above.
Fonts
As with HTML and CSS, text in SVG may reference external font files,
such as system fonts. If the required font files do not exist on the
machine where the SVG file is rendered, the text may not appear as
intended. To overcome this limitation, text can be displayed in an SVG font, where the required glyphs are defined in SVG as a font that is then referenced from the element.
Metadata
In accord with the W3C's Semantic Web initiative, SVG allows authors to provide metadata about SVG content. The main facility is the element, where the document can be described using Dublin Core
metadata properties (e.g. title, creator/author, subject, description,
etc.). Other metadata schemas may also be used. In addition, SVG defines
and elements where
authors may also provide plain-text descriptive material within an SVG
image to help indexing, searching and retrieval by a number of means.
An SVG document can define components including shapes, gradients etc., and use them repeatedly. SVG images can also contain raster graphics, such as PNG and JPEG images, and further SVG images.
Example
This code will produce the colored shapes shown in the image, excluding the grid and labels:
The use of SVG on the web was limited by the lack of support in older versions of Internet Explorer (IE). Many web sites that serve SVG images, such as Wikipedia, also provide the images in a raster format, either automatically by HTTPcontent negotiation or by allowing the user directly to choose the file.
Google
announced on 31 August 2010 that it had started to index SVG content on
the web, whether it is in standalone files or embedded in HTML, and that users would begin to see such content listed among their search results.
It was announced on 8 December 2010 that Google Image Search would also begin indexing SVG files. The site announced an option to restrict image searches to SVG files on 11 February 2011.
Native browser support
Konqueror was the first browser to support SVG in release version 3.2 in February 2004.
As of 2011, all major desktop browsers, and many minor ones, have some
level of SVG support. Other browsers' implementations are not yet
complete; see comparison of layout engines for further details.
Some earlier versions of Firefox (e.g. versions between 1.5 and 3.6), as well as a smattering of other now-outdated web browsers capable of displaying SVG graphics, needed them embedded in or elements to display them integrated as parts of an HTML webpage instead of using the standard way of integrating images with . However, SVG images may be included in XHTML pages using XML namespaces.
Tim Berners-Lee, the inventor of the World Wide Web, has been critical of (earlier versions of) Internet Explorer for its failure to support SVG.
Opera
(since 8.0) has support for the SVG 1.1 Tiny specification, while Opera
9 includes SVG 1.1 Basic support and some of SVG 1.1 Full. Opera 9.5
has partial SVG Tiny 1.2 support. It also supports SVGZ (compressed
SVG).
Browsers based on the Geckolayout engine (such as Firefox, Flock, Camino, and SeaMonkey)
all have had incomplete support for the SVG 1.1 Full specification
since 2005. The Mozilla site has an overview of the modules which are
supported in Firefox and of the modules which are development. Gecko 1.9, included in Firefox 3.0, adds support for more of the SVG specification (including filters).
Pale Moon, which uses the Goanna layout engine (a fork of the Gecko engine), supports SVG.
Internet Explorer 8 and older versions do not support SVG. IE9 (released 14 March 2011) supports the basic SVG feature set. IE10 extended SVG support by adding SVG 1.1 filters.
There are several advantages to native and full support: plugins
are not needed, SVG can be freely mixed with other content in a single
document, and rendering and scripting become considerably more reliable.
Mobile support
SVG
Tiny (SVGT) 1.1 and 1.2 are mobile profiles for SVG. SVGT 1.2 includes
some features not found in SVG 1.1, including non-scaling strokes, which
are supported by some SVG 1.1 implementations, such as Opera, Firefox
and WebKit. As shared code bases between desktop and mobile browsers
increased, the use of SVG 1.1 over SVGT 1.2 also increased.
Support for SVG may be limited to SVGT on older or more limited smart phones or may be primarily limited by their respective operating system. Adobe Flash Lite has optionally supported SVG Tiny since version 1.1. At the SVG Open 2005 conference, Sun demonstrated a mobile implementation of SVG Tiny 1.1 for the Connected Limited Device Configuration (CLDC) platform.
Mobiles that use Opera Mobile, as well as the iPhone's built in browser, also include SVG support. However, even though it used the WebKit engine, the Android built-in browser did not support SVG prior to v3.0 (Honeycomb). Prior to v3.0, Firefox Mobile 4.0b2 (beta) for Android was the first browser running under Android to support SVG by default.
The level of SVG Tiny support available varies from mobile to
mobile, depending on the SVG engine installed. Many newer mobile
products support additional features beyond SVG Tiny 1.1, like gradient
and opacity; this is sometimes referred to as "SVGT 1.1+", though there
is no such standard.
RIM's BlackBerry has built-in support for SVG Tiny 1.1 since version 5.0. Support continues for WebKit-based BlackBerry Torch browser in OS 6 and 7.
Nokia's S60 platform
has built-in support for SVG. For example, icons are generally rendered
using the platform's SVG engine. Nokia has also led the JSR 226:
Scalable 2D Vector Graphics API expert group that defines Java ME API for SVG presentation and manipulation. This API has been implemented in S60 Platform 3rd Edition Feature Pack 1 and onward. Some Series 40 phones also support SVG (such as Nokia 6280).
Most Sony Ericsson phones beginning with K700 (by release date) support SVG Tiny 1.1. Phones beginning with K750 also support such features as opacity and gradients. Phones with Sony Ericsson Java Platform-8 have support for JSR 226.
SVG is also supported on various mobile devices from Motorola, Samsung, LG, and Siemens mobile/BenQ-Siemens. eSVG, an SVG rendering library mainly written for embedded devices, is available on some mobile platforms.
Software can be programmed to render SVG images by using a library such as librsvg used by GNOME since 2000, or Batik. SVG images can also be rendered to any desired popular image format by using ImageMagick, a free command-line utility (which also uses librsvg under the hood).