W3cubDocs

/SVG

<discard>

The <discard> SVG element allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an SVG user agent. This is particularly useful to help SVG viewers conserve memory while displaying long-running documents.

The <discard> element may occur wherever the <animate> element may.

Usage context

Categories Animation element
Permitted content Any number of the following elements, in any order:
Descriptive elements
<script>

Attributes

Global attributes

Specific attributes

  • begin
  • href (but note that <discard> has never supported xlink:href)

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
discard 34–81 79–81 No No 21–68 No 37–81 34–81 No 21–58 No 2.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/discard