You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the <video> tag is used, the video source is loaded at the same time as the page. However, it is never certain that the user will consult this content.
To prevent downloading of the video, you must use the "preload" attribute with the value "none".
Please note that the use of "preload=none" should be supplemented with the "poster" attribute to provide an (optimized) preview image of the video content.
<!-- Bad: "preload" is not specified, so the video is automatically downloaded. --><video><sourcesrc="/path/to/video.m4v" type="video/mp4"></video><!-- Almost good: "preload=none" is specified, so the video will only be downloaded if the user asks to play it. But there is no preview. --><videopreload="none"><sourcesrc="/path/to/video.m4v" type="video/mp4"></video><!-- Good: "preload=none" is specified AND "poster" too --><videopreload="none" poster="/path/to/poster.webp"><sourcesrc="/path/to/video.m4v" type="video/mp4"></video>
Note: when the "autoplay" attribute is specified, "preload=none" will be ignored.
The text was updated successfully, but these errors were encountered:
JulienWilhelm
changed the title
New rule: Never preload video
New rule: Never preload video in <video>
Jul 18, 2024
JulienWilhelm
changed the title
New rule: Never preload video in <video>
New rule: Never preload video in the <video> tag
Jul 18, 2024
When the
<video>
tag is used, the video source is loaded at the same time as the page. However, it is never certain that the user will consult this content.To prevent downloading of the video, you must use the "preload" attribute with the value "none".
Please note that the use of "preload=none" should be supplemented with the "poster" attribute to provide an (optimized) preview image of the video content.
Note: when the "autoplay" attribute is specified, "preload=none" will be ignored.
The text was updated successfully, but these errors were encountered: