Skip to content

In China, the default homepage loading will stuck at https://fonts.googleapis.com #5403

@Bohemian2024

Description

@Bohemian2024

In China, the default homepage loading will stuck at https://fonts.googleapis.com

The default Inter font from https://fonts.googleapis.com can't be accessed from China.

Steps To Reproduce

Steps to reproduce the behavior:

  • I just followed the simple hot_dog project in Dioxus official website. After running "dx serve" command in terminal, then I open "http://127.0.0.1:8080" in Safari. It takes too much time to show something, and even show nothing sometimes.
  • I switched to develop mode in Safari, and found it's trying to load "https://fonts.googleapis.com". But in my whole project, I even don't use it at all.
  • After some study, I found it's that the two files dev.index.html and dev.loading.html are calling it. So I copy dev.index.html to the project's root folder, rename it as "index.html" but delete the following line. Then everything is fine, reloading the page is very fast now.
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap') layer;
  • At the same time, I still want to use Inter font, so I download some static font files to assets folder and link it in the main.css. Then, it's also working well.

Environment:

  • Dioxus version: 0.7.1
  • Rust version: 1.94
  • OS info: macOS 26
  • App platform: web

Questionnaire
I think this issue only exists in China at the moment because we can't access google directly from public internet. I would if the default address can be well addressed in Dioxus. To use a different location or force copy the index.html file to project root folder in creating a new project and ask user to adjust when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions