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

[UI] Google fonts loading prevent page render #2993

Open
dolfinus opened this issue Dec 17, 2024 · 0 comments
Open

[UI] Google fonts loading prevent page render #2993

dolfinus opened this issue Dec 17, 2024 · 0 comments

Comments

@dolfinus
Copy link
Contributor

dolfinus commented Dec 17, 2024

I'm running Marquez inside company network which has no direct internet access. Opening any page of Marquez UI leads to showing a blank page for ~15 seconds, and only then the UI is rendered as expected.

This is because HTML <head> tag contains:

<link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700|Karla:400,700&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">

These URLs cannot be resolved without internet access, and after 15 seconds browser give up, and renders the page with default fonts. Because these fonts are in the <head> tag, browser cannot fetch then in the background.

Please consider one of these options:

  • use @font-fase CSS rule with font-display fallback or swap
  • use FontFace JS class for lazy loading font files
  • include font files into the static bundle served by web container
@dolfinus dolfinus changed the title [UI] Include Google fonts to Docker image [UI] Google fonts loading prevent page render Dec 17, 2024
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

No branches or pull requests

1 participant