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

[BUG] Long load time in Chrome, hang in Firefox due to long icon loading #496

Open
jjhiew opened this issue Mar 24, 2022 · 8 comments
Open

Comments

@jjhiew
Copy link

jjhiew commented Mar 24, 2022

Module version
1.12.3

Describe the bug
The default mdi CDN is loading very slowly, which causes the browser to be completely unresponsive until the icons are done loading. On Chrome, the delay is a few seconds. Of Firefox, it hangs for about a minute.

To Reproduce

  1. Spin up a new nuxt app using create-nuxt-app
  2. choose the Vuetify UI package
  3. every other option doesn't matter, can leave those as default
  4. open the app once it's loaded, in Chrome you should see that it takes a few seconds for the loading animation to stop. On firefox, you'll see the browser hang if you try to do anything (click around, resize window, etc.)

Expected behavior
It should load quickly

Screenshots
N/A

Additional context
Work around is to not use the mdi icon package, and instead choose another via setting:

Switching to the another icon package solves the issue.

    defaultAssets: {
      icons: 'md'
    },

Doing this will prevent the browsers from hanging. However, perhaps a better approach would be to not lock things up while trying to load the fonts/icons from CDN.

@Rleit
Copy link

Rleit commented Mar 24, 2022

Can confirm same issue.

@Star-Best
Copy link

I can also confirm the same issue since today.

@Rleit
Copy link

Rleit commented Mar 24, 2022

@Star-Best
Copy link

Star-Best commented Mar 24, 2022

Temp Fix for Nuxt + Vuetify:

Install the older version of @mdi/font

npm install @mdi/[email protected]

Reference this version + Block automatic fetching of latest mdi/fonts via vuetify.

nuxt.config.js:

 css: [
    '@mdi/font/css/materialdesignicons.css'
  ],

....

vuetify: {    
    defaultAssets: false,
    icons: {
       iconfont: 'mdi',
    },....
}

@irongomme
Copy link

irongomme commented Mar 25, 2022

It would be better in the future to avoid referencing cdn url of type "latest", which can bring (as we've been confonted with) instability and unpredictability.
In addition, that would be nice to have the ability to override those urls into the nuxt.config

@softy2k
Copy link

softy2k commented Mar 25, 2022

Same issue since yesterday...

@qualiatokyoltd
Copy link

I have same issue. it appears only latest chrome on windows10 with disabled cache.

when cache enabled, this issue will not appear.

Chrome for Mac, Android,iOS isn't have this issue.

I tried to bandle mdi icons locally, it fixed.

@softy2k
Copy link

softy2k commented Mar 25, 2022

My workaround: I changed in file /public/index.html

from
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
to
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css">

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

6 participants