MPA fallback for when SPA link navigation is too slow #304
maiieul
started this conversation in
Proposals For Qwik
Replies: 1 comment 2 replies
-
|
I am very excited for this. We have noticed big delays in navigation on our website. |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
What is it about?
Providing an MPA fallback for when SPA navigation is too slow
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
Proposed Solution / Feature
What do you propose?
Fallback to MPA if more than a 100 bundles need to be preloaded on click/tap. If the bundles have been preloaded or cached by the browser (disk or memory cache), it will always be SPA.
Code examples
This feature is on by default and can be turned off by the developer with
<Link fallbackToMpa={false}>.Links / References
Draft PR in progress: QwikDev/qwik#7915
As explained in the code comments the threshold is not configurable yet. This should probably not be implemented until the MPA fallback has been tested in production. We should also not make it configurable until we figure what the threshold should be based on: number of bundles needed to be preloaded for the next route, or the size of these bundles. Using the size is more precise, but it also adds more weight to the bundle-graph. In the future, we might be able to speed up SPA so much that falling back to MPA will never make sense.
Beta Was this translation helpful? Give feedback.
All reactions