HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

preload

Description

The preload attribute for HTML specifies how much buffering the media resource will likely need.

Syntax

preload="value"

Values

none

Hints to the user agent that either the author does not expect the user to need the media resource, or that the server wants to minimize unnecessary traffic. This state does not provide a hint regarding how aggressively to actually download the media resource if buffering starts.

metadata

Hints to the user agent that the author does not expect the user to need the media resource, but that fetching the resource metadata, and maybe even the first few frames, is reasonable. If the user agent precisely fetches no more than the metadata, then the media element will end up with its readyState attribute set to HAVE_METADATA; typically though, some frames will be obtained as well and it will probably be HAVE_CURRENT_DATA or HAVE_FUTURE_DATA. When the media resource is playing, hints to the user agent that bandwidth is to be considered scarce, e.g. suggesting throttling the download so that the media data is obtained at the slowest possible rate that still maintains consistent playback.

auto

Hints to the user agent that the user agent can put the user's needs first without risk to the server, up to and including optimistically downloading the entire resource.

Examples

1 · HTML · none

2 · HTML · metadata

3 · HTML · auto

4 · JS · none

5 · JS · metadata

6 · JS · auto