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

Preloaded JS is downloaded, but never used #31

Open
harrygreen opened this issue Nov 25, 2019 · 0 comments
Open

Preloaded JS is downloaded, but never used #31

harrygreen opened this issue Nov 25, 2019 · 0 comments

Comments

@harrygreen
Copy link

harrygreen commented Nov 25, 2019

Problem

Gatsby add <link rel="preload" ... /> scripts to each page. The browser will download these, but never execute them. Chrome warns about this issue with the console message:

The resource https://path/to/script.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

Solution

Add code to remove these (inside here?) when calling replaceHeadComponents().

PR here: #32

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