-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Skip webpackPrefetch if the module is already preloaded #17497
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
base: main
Are you sure you want to change the base?
Conversation
|
For maintainers only:
|
Hi @FogelAI. Just a little hint from a friendly bot about the best practice when submitting pull requests:
You don't have to change it for this PR, just make sure to follow this hint the next time you submit a PR. |
Any updates? The PR is very important for me. |
Why? The browser will load it from the cache anyway. This code increase runtime size without any profit |
Try the example in the issue #17496. |
Because browsers have different behaviour I don't want to land this PR right now, before deciding to fix it, we need to get feedback and understand which behavior is correct. That is intresting if you have:
Chrome doesn't create an extra request, but if you have
And then create |
/cc @paulirish @addyosmani Should I open a bug report? Thanks |
Motivation / Use-Case
It prevents an additional network request for prefetching (webpackPrefetch) when the module is already preloaded.
It fixes the issue #17496.
Summary
🤖 Generated by Copilot at f5dab1b
Avoid duplicate prefetch links for JSONP chunks. Check existing preload link elements in
lib/web/JsonpChunkLoadingRuntimeModule.js
before creating and appending prefetch links.Details
🤖 Generated by Copilot at f5dab1b