-
Notifications
You must be signed in to change notification settings - Fork 0
MPA fallback for when SPA link navigation is too slow #308
Copy link
Copy link
Open
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Metadata
Metadata
Assignees
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Type
Projects
Status
In Progress (STAGE 2)
Discussed in #304
Originally posted by maiieul September 11, 2025
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.