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

Unused json and js files after gatsby build (Google pagespeed) #11563

Closed
Jornve opened this issue Feb 5, 2019 · 11 comments
Closed

Unused json and js files after gatsby build (Google pagespeed) #11563

Jornve opened this issue Feb 5, 2019 · 11 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more.

Comments

@Jornve
Copy link

Jornve commented Feb 5, 2019

Hi guys!

When validating our new Gatsby website with PageSpeed Insights our score dropped significantly due to unused json and js files. Anyone had this issue before and/or know how to solve this?

Screenshot

@sidharthachatterjee
Copy link
Contributor

@Jornve These warnings are displayed when some assets that are preloaded in the browser are not eventually used.

Gatsby preloads assets for pages that are linked to in the viewport — so the page loads practically instantly when the user clicks on the link. In this case, the PageSpeed Insights test is likely not navigating through to multiple pages and therefore this warning is being thrown.

I would say that it's okay to ignore these warnings but keeping this open to hear what others have to say on this issue.

@pgilad
Copy link
Contributor

pgilad commented Feb 20, 2019

According to @addyosmani answer here (GoogleChromeLabs/preload-webpack-plugin#8 (comment)) it seems the correct method of loading assets from another page is prefetch and not preload

@KyleAMathews
Copy link
Contributor

What site is this? Gatsby adds preload links to SSRed HTML for the initial critical resources. We do use prefetch for prefetching subsequent resources.

I haven't seen this error before. How much JS are you loading initially?

@Jornve
Copy link
Author

Jornve commented Feb 20, 2019

@KyleAMathews Here is a preview link: https://5c6a83cd7cf4c1000bf91a3f--amazing-pare-38b4d5.netlify.com/

I do have to mention that we don't have a score drop when testing with Lighthouse. For some reason these tools are not fully in sync.

@rshackleton
Copy link

Seeing the same preload warnings on PSI for my own website: https://rshackleton.co.uk/

image

@gatsbot
Copy link

gatsbot bot commented Mar 25, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 25, 2019
@DSchau DSchau added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Mar 25, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 11, 2019
@gatsbot
Copy link

gatsbot bot commented Oct 11, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot
Copy link

gatsbot bot commented Oct 22, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Oct 22, 2019
@jackyef
Copy link

jackyef commented Jan 12, 2020

Bump! Seeing this issue as well on my site powered by gatsby.

@ghassanmas
Copy link

+1 for having this issue as well

@lnikell
Copy link

lnikell commented Jun 4, 2020

Same for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more.
Projects
None yet
Development

No branches or pull requests

10 participants