Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to put a video on a landing page without hurting page speed

A product video is usually the heaviest thing on a landing page, and the easiest to get wrong. Here is the setup I use so the video helps conversion without costing page speed. Host it elsewhere, embed it Do not serve a large video file from your own server. Upload to YouTube or Vimeo and embed. YouTube helps discovery, Vimeo gives you more control over the player. Either is fine, so pick based…

When adding a video to a landing page, it's crucial to avoid negatively impacting page speed. The video tends to be the largest file on the page and can be easily mishandled. The recommended approach is to host the video externally and embed it.

Two primary options for hosting are YouTube and Vimeo. Choose based on whether you prioritize discovery (YouTube) or control over the player (Vimeo). Instead of having the video load instantly, display a thumbnail and only load the video player when the user clicks on it. This approach reduces the initial page load time.

To incorporate the video, create a container with a fixed aspect ratio (16:9 in this example) to prevent layout shifts when the player loads. Embed the video using an iframe and set its attributes, such as autoplay, encrypted-media, and picture-in-picture. Include a play button next to the thumbnail for easy access.

Add captions and a brief summary below the video to assist users who watch without sound and improve search engine understanding of the content. Utilize structured data like VideoObject markup to provide search engines with relevant information about the video.

If the landing page is meant for search engine discovery, include the video in a video sitemap. However, avoid autoplay with sound, as it can negatively impact user experience. Follow the checklist provided for optimal video embedding without slowing down the page.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

127 vues et 0 clic — le tableau de bord le plus utile que j'aie construit

J'ai écrit mon propre tracker de clics pour une raison simple : je voulais savoir si les visiteurs d'une page cliquaient sur le lien qu'elle contenait.

  • Author built a custom click-tracking system with PHP and SQLite
  • Tracker logs page views and clicks, including browser agent hash
  • Bug caused missed click events, but fixing it showed zero clicks

A web game in a native shell: shipping to Google Play and the App Store with Capacitor in five days

Cannon King: Wind Tank Battle started as a browser game — TypeScript, a canvas, a physics loop I could reload in 300 ms. The problem was distribution: nobody finds a URL, and the stores are where the…

  • Cannon King's web game, Wind Tank Battle, launched as browser-based artillery battle.
  • Native shell created using Capacitor, shipped to Google Play and App Store within five days.

Terminal basics for vibe coders: read before you approve

The short version Coding agents like Claude Code and Codex do their work by running commands in your terminal, so learn enough Bash to read a command before you approve it.

  • Terminal commands are executed through the coding agent's communication with your machine.
  • Deleting files with 'rm -rf' is permanent and irreversible; double-check paths and scope.
  • Proficiency in basic Bash commands helps review agent commands before approval.

More from Saturday 14 November →