Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance #965

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

stevenguyukai
Copy link
Contributor

@stevenguyukai stevenguyukai commented Apr 22, 2024

Summary

1. Eliminate render-blocking resources

⭐️Main Change:

Change rel="stylesheet" to rel="preload"
Add as="style" onload="this.rel='stylesheet'"

Render-Blocking resources:

  • google_font_roboto_300_400_500_700.css
  • https://unpkg.com/[email protected]/dist/leaflet.css
  • https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
  • https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.css

Official Doc - render-blocking-resource



2. Preload Largest Contentful Paint (LCP) element's image

⭐️Main Change:

Preload the patchNote's gif image to the index.html

LCP element:

  • PatchNotes.tsx

Optimizing LCP element



3. Pre-connect to required origin

⭐️Main Change:

Pre-connect to https://fonts.gstatic.com in the index.html

Resources using this website:

  • google_font_roboto_300_400_500_700.css

Official Doc - uses-rel-preconnect



4. Ensure text remains visible during webfont load

⭐️Main Change:

Add font-display: swap to some font family

Official Doc - Font display



Issue

Closes #957

@stevenguyukai stevenguyukai linked an issue Apr 22, 2024 that may be closed by this pull request
@stevenguyukai stevenguyukai self-assigned this Apr 22, 2024
@stevenguyukai stevenguyukai changed the title Update unnecessary stylesheet from blocking render Improve performance Apr 23, 2024
@github-actions github-actions bot added the Stale label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve website performance
1 participant