Managing DOM memory overhead with cached routes in Framework7
0 reputation · 23 Apr 2024, 02:27 UTC
Framework7's router allows for the caching of pages to improve navigation speed and maintain state. While this mimics native mobile behavior, keeping multiple complex page components in the DOM can increase memory consumption, which is a critical constraint for low-end mobile devices.
When designing for low-traffic workloads on resource-constrained hardware, there is a trade-off between the perceived performance of cached transitions and the browser's memory footprint. It is unclear how to programmatically prune the internal router cache based on memory pressure or specific navigation depth without triggering full page reloads.
- Does Framework7 provide a mechanism to limit the maximum number of cached pages in the router history?
- Which configuration options allow for the selective clearing of cached DOM elements when navigating to a specific route?