Preload on-demand JavaScript #21698
nisbet-hubbard
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
What problem is your feature request going to solve? Please describe.
Currently, the Improved Asset Loading experiment defers loading certain scripts until user interaction. The js for a pop-up, for example, is only downloaded when the widget gets triggered.
This causes a delay, especially on slower network connections, during which any functionality within the widget in question is unusable. A form widget with steps within a pop-up will for a moment display the final step, for instance, before reverting to the first step when the script is fully loaded.
Describe the solution you'd like
It would be nice if certain well-chosen user actions could trigger on-demand JavaScripts being preloaded, a version of which is suggested by @malchata in his responsible JavaScript book:
Describe alternatives you've considered
The alternative is to turn off the experiment and defer js loading using a plugin (ie no longer on-demand).
Additional context
No response
All reactions