CKTIS / HTML
preload — media preloading hint
The preload attribute on audio and video tells the browser how much media data may be worth fetching ahead of time. Its none, metadata, and auto values are hints, not guarantees.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
preload="none|metadata|auto"preload is an enumerated attribute on audio and video, not a boolean attribute. It suggests a buffering strategy for the media resource.
none suggests avoiding advance fetching; it does not prohibit fetching once playback starts. metadata suggests fetching metadata, such as duration and dimensions, possibly including initial frames; during playback, it signals scarce bandwidth. auto permits downloading even the entire resource, but does not require it.
An empty value means auto. For an omitted attribute or an invalid value, the default behavior is implementation-defined; the standard suggests metadata.
The browser may ignore the hint. autoplay can override it, and with scripting enabled, loading="lazy" can defer acting on it. The DOM property preload reflects the attribute and allows changing the hint even during buffering or playback.
Examples
<!doctype html>
<meta charset="utf-8">
<title>preload</title>
<audio id="media" preload="none"></audio>
<pre id="result"></pre>
<script>
const media = document.getElementById('media');
const values = [media.preload];
media.preload = 'metadata';
values.push(media.preload);
media.preload = 'auto';
values.push(media.preload);
document.getElementById('result').textContent = values.join('\n');
</script>Result
none metadata auto
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.