Gatsby Link has delay on click
Asked Answered
G

0

8

I'm working with Gatsby.js Everything was pretty nice since I've started building the menu. When I clicked the Link component I've waited for about 2 seconds and then I was redirected to the next page. The weird thing is that the URL is changing instantly, but the content is not.

I read this article https://www.gatsbyjs.org/blog/2019-06-12-performance-improvements-for-large-sites

But it doesn't help anyway.

Edit: If the content on the next site is small the delay is also smaller.

Github issue: https://github.com/gatsbyjs/gatsby/issues/21193

Gratulate answered 4/2, 2020 at 10:25 Comment(15)
did you check if the same lag appears, if you navigate back and click the link again?Archibaldo
Yes, it happens every time, but sometimes it's less buggyGratulate
I'm not very good with gatsby but i assume it could be a problem with your pages-manifest.json gatsbyjs.org/blog/…Archibaldo
It can be, but as the Gatsby team wrote in this article: "From this point forward, your application manifest will no longer grow proportionally to the number of pages in your Gatsby application." So I assume that the Gatsby 2.9 contains this fixGratulate
As i understand the article you maybe need to activate this, i'm not sure if this working automatically. You could check your manifest file in the chrome dev tools to see how much data is in thereArchibaldo
Hmm, I am not sure about that, I think if there would be the option to turn it on, they probably will write the article/tutorial how to do it. Manifest in Chrome looks normal - it contains the URL, icons, info about service workers, nothing special.Gratulate
Did you ask on the Gatsby community?Incomer
I've already created the issue ticket on Github github.com/gatsbyjs/gatsby/issues/21193Gratulate
@MaksymilianKonarski have you solved the issue. I am currently facing it. Please do help if you have resolved itAmu
@MaksymilianKonarski Facing the same issue, let us know if you got any fix :)Liberati
@RahulSuresh Are you using preact and gatsby-plugin-preact ?Amu
@Amu Nope, its the default gatsby template which uses react. But I just noticed that it happens only when page hasn't loaded/painted completely. If the net speed is fast and if the paint completes, then there is no delay.Liberati
@RahulSuresh Gatsby will only prefetch links if the network is 3G and above. My problem was with the preact and gatsby-plugin-preactAmu
@Amu I didn't solve the problemGratulate
same issue in 2021 (Abominable

© 2022 - 2024 — McMap. All rights reserved.