preload
Media loading strategy for audio and video elements. Balance bandwidth savings against playback responsiveness with none, metadata, or auto.
Overview
The preload attribute hints to the browser how much of a media file to download before the user presses play. It controls the tradeoff between bandwidth usage and playback responsiveness.
Values
| Value | What Loads | Tradeoff |
|---|---|---|
none | Nothing until play is triggered | Maximum bandwidth savings; playback starts with a delay |
metadata | Duration, dimensions, first frame (small download) | Good balance; UI shows duration and timeline immediately |
auto | Browser decides, often buffers the entire file | Fastest playback start; highest bandwidth cost |
"" (empty string) | Same as auto | Equivalent to auto per the spec |
The default when the attribute is absent varies by browser, but most treat it as metadata.
Choosing a Strategy
preload="none" + poster
Best for pages with multiple videos or hero sections. The browser downloads zero video data, showing only the poster image. Pair with poster to avoid a blank rectangle.
preload="metadata"
Best for audio players and single-video pages. The browser fetches just enough data to display the duration, timeline scrubber, and first video frame. This is typically a few hundred kilobytes.
preload="auto"
Best when instant playback is critical (e.g., a short sound effect, a video that users are very likely to play). The browser may buffer the entire file, so use sparingly on pages with multiple media elements.
Interaction with autoplay
The autoplay attribute overrides preload. The browser must download the media to begin playback, regardless of the preload value. Setting preload="none" alongside autoplay has no practical effect.
Multiple Media on One Page
On pages with several videos, set preload="none" on all but the primary video. This prevents the browser from downloading gigabytes of data the user may never watch.
Accessibility
preload="none"with noposterrenders a blank box, which gives sighted users no indication a video exists. Always pair with a poster or surrounding descriptive text.- When
preload="metadata"loads the duration, screen readers can announce the media length, improving the user's ability to decide whether to play. - Preload does not affect whether
controlsare shown. Ensure controls are present (or a custom UI is provided) regardless of preload strategy.
Limitations
- It is a hint, not a command. Browsers may ignore
preloadbased on network conditions, data saver mode, or internal heuristics. Chrome on Android with Data Saver forcespreload="none". - There is no event to confirm which preload strategy the browser actually used.
preloaddoes not apply to<source>elements. It goes on the parent<video>or<audio>element.- Changing
preloadvia JavaScript after the media element is in the DOM may have no effect if the browser has already started loading. - On iOS Safari, video preloading behavior is heavily restricted. The browser often treats all values as
noneuntil a user gesture triggers playback.