framework7

Open full view…

Remove page from history and cache

Wouter van Os
Tue, 29 Mar 2016 13:50:25 GMT

Currently we're creating a "create"-wizard, which creates a chat. This wizard contains multiple pages. After the creation has been finished, I don't want to let the user navigate back through the wizard. I've tried to manipulate the `mainView.history`, but it seems like this is ignored because the last page is always cached. How to do this the right way? I currently use `mainView.router.loadPage` to force load a page.

Dvorah
Wed, 20 Apr 2016 11:04:40 GMT

I have the same problem. Nobody have a solution ?

galebnas
Wed, 20 Apr 2016 22:56:12 GMT

Try this: --- mainView.history = ['index.html']; $$('.view-main .page-on-left').remove(); --- then load the new page with this: --- mainView.router.load({url: 'newPage.html', ignoreCache: true, reload: true}); ---

Dvorah
Thu, 21 Apr 2016 07:24:13 GMT

Thank you galebnas BUT the back link to index.html doesn't work...

desmeit
Tue, 15 Nov 2016 16:02:03 GMT

Some problem here.

dariusneo
Sat, 21 Jan 2017 05:04:24 GMT

same here, tried $$('.view-main .page-on-left').remove(); but it does not remove the history, as i can still cick back to go back to the prev page

anthonymaster
Fri, 27 Oct 2017 02:33:17 GMT

The trick here is to change the history and remove page on left after animation --- ... myApp.onPageAfterAnimation('*', function(page){ if(page.name=='your-new-page-name'){ $$('.view-right .page-on-left').remove(); } }); ---