question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v3] stackPages needs a maximum

See original GitHub issue

This 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:open
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nolimits4webcommented, Mar 13, 2017

@ZanderBrown I think it can be useful, will add it to roadmap

0reactions
pluckannfeelcommented, Nov 19, 2018

Im using v2, is this applicable?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found