Skip to content

Conversation

@nandu-99
Copy link

@nandu-99 nandu-99 commented Nov 12, 2025

This PR focuses on improving the landing page performance by addressing two major bottlenecks:

  1. The direct YouTube iframe embed, which was causing heavy render-blocking and unnecessary JS/CSS requests on initial load.

  2. The remote Switzer font loading, which introduced render-blocking font requests and slowed down page rendering.


Changes Implemented

YouTube Embed Optimization

Screenshot 2025-11-13 at 12 55 04 AM
  • Replaced the direct YouTube iframe with a lightweight image + play button approach.

  • The iframe now loads only after user interaction (on click), preventing unnecessary script and CSS loads during initial render.

  • Uploaded the YouTube logo SVG to /logos for consistent UI integration.

  • Verified reduced network requests and improved initial load performance.

Before: Loaded automatically on page render (causing unnecessary script and style requests)

Screenshot 2025-11-13 at 12 51 59 AM Screenshot 2025-11-13 at 12 52 44 AM

After: Loads only on user interaction

Screenshot 2025-11-13 at 12 53 56 AM Screenshot 2025-11-13 at 12 53 32 AM

Font Loading Optimization

  • Removed remote Google Fonts import:

    /css?f%5B%5D=switzer@400,500,600,700&display=swap
    
  • Downloaded Switzer from Fontshare.

  • Added local font files in src/fonts.

  • Updated font configuration to load fonts locally using next/font/local, eliminating render-blocking font requests.

Before: Render blocking requests estimated savings of ~900 ms.
Screenshot 2025-11-13 at 12 50 37 AM After: Render-blocking requests completely removed.

Screenshot 2025-11-13 at 12 55 27 AM

Fixes #113

@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for landing-ohc ready!

Name Link
🔨 Latest commit ca2593f
🔍 Latest deploy log https://app.netlify.com/projects/landing-ohc/deploys/6914e465a215e40008edddd6
😎 Deploy Preview https://deploy-preview-114--landing-ohc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nandu-99 nandu-99 changed the title Optimize YouTube Embed & Font Loading (Performance Improvements #113) Optimize YouTube Embed & Font Loading (Performance Improvements) Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Landing Page Performance Degradation Due to Direct YouTube Iframe Embed

1 participant