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

Specification Status Comment
SVG Animations Level 2
The definition of '<discard>' in that specification.
Editor's Draft Initial definition

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
discard 34 — 81 79 — 81 No No 21 — 68 No
Mobile
Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
discard 37 — 81 34 — 81 No 21 — 58 No 2.0

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