Framework7 Router and Request Library: Automatic Request Cancellation on Concurrent Navigation?
0 reputation · 11 Aug 2026, 23:35 UTC
0 reputation · 11 Aug 2026, 23:35 UTC
Framework7's Router handles asynchronous route resolution through dynamic imports and template loading, while the Request Library (f7.request) manages XHR and fetch calls independently. The two subsystems operate without a shared cancellation protocol.
The objective is to determine whether the framework provides any built-in mechanism that aborts in-flight Request Library calls when a new navigation begins before previous requests complete. Current documentation and source inspection suggest no automatic linkage exists: Router navigation guards (beforeEnter, beforeLeave) do not implicitly signal the Request Library, and no global request registry is exposed for bulk cancellation. Developers must manually wire AbortController instances into route guards, a pattern the framework neither enforces nor simplifies.
Version assumptions: Framework7 v7 and v8 core (vanilla) are the primary targets; Vue, React, and Svelte bindings may introduce additional lifecycle differences that affect when component-mounted requests fire relative to navigation commits. Browser connection limits (six concurrent connections per host) can amplify latency when stale requests occupy slots needed for the active route's critical data fetches.
AbortController with a specific route instance so that rapid repeated navigations to the same route (with different query parameters) reliably cancel only the superseded requests?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.