[v3] stackPages needs a maximum
See original GitHub issueThis is a (multiple allowed):
- bug
- enhancement
- feature-discussion (RFC)
- Framework7 Version: 1.4.2
- Platform and Target: Cordova iOS
When enabling domCache: true, it would be nice to have a way to limit the number of pages that get cached. Something like domCacheMax: 5 to limit the max cached pages to 5. I like using domCache because it preserves the exact page state when a user hits back, but there needs to be a way to limit this so it does not get out of hand.
I added a hack in a plugin that does this for myself (I’m using jquery).
if (view.params.domCache && view.params.domCacheMax && view.history.length > view.params.domCacheMax) {
var removed = view.history.splice(1, 1);
var $page = $(view.pagesContainer).children('.page[data-page="' + removed[0] + '"]:first');
if (view.initialPages.indexOf($page[0]) == -1) {
app.pageRemoveCallback(view, $page[0], 'left');
$page.remove();
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to Exclude form page from stackPages?
HI How to Exclude form page from stackPages? and what is the max limit of stackPages?
Read more >Ways to stack pages? : r/HPHogwartsMystery - Reddit
... I just NEED to own), I was wondering if there were any ways to stack pages that I ... The daily planner...
Read more >Phase #3: Caching and Virtual Memory
As with project phase 2, the maximum number of stack pages needed by a process is 8. Be aware that in project 3...
Read more >CSE 120 Spring 08: Projects
Early Submit Checkpoints: June 1 and 3 and 4, at 21:00 PDT ... As with project phase 2, the maximum number of stack...
Read more >pushState problem Framework7 v3.5.2 doesn't load the view
But, I think issue not in handling backbutton, I think you need ... view: { stackPages: true, pushState: true, pushStateOnLoad: false }, ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ZanderBrown I think it can be useful, will add it to roadmap
Im using v2, is this applicable?