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.

How to go back and refresh the previous page.

See original GitHub issue

For example :I want to go back to page1 from page2 and refresh page1

myApp.onPageBeforeAnimation('page1', function (page){

  if (page.from === 'left') {
       page.view.router.refreshPage();
  }
});

But page1 cant`t refresh .Why? @nolimits4web

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
631068264commented, Nov 3, 2015

Thanks. The solution is

page.view.router.back({
                    url: xxxxx,
                    force: true,
                    ignoreCache: true
                })
1reaction
AndreRenaldocommented, Apr 1, 2017

Hi i’m still new in f7, i have an index page which have login screen modal written on it too and also i have a function running in index onPageInit to load some information about user in a <div id="info"></div>, problem is when i do login i want to going back to new refreshed index page from wherever page i am before, i’m using all the solution you suggest, it do works, but my user information keep disappearing i assume it happens due to opening a new layer index page so the load function js on <div id="info"></div> can run only once, this also affect the login alert, when i log out and log in again the alert that indicate login shows multiple times and it’s buggers me here is the code i use for log in and log out routing:

mainView.router.refreshPage(); mainView.router.back({url: 'index.html', force: true, ignoreCache: true,reload: true});

i change the div id info into class info so it solved but the alert still multiplies when i do login and log out several times, what i want to know is it possible to do log in in log in screen modal and then go to refreshed index page without opening some like new layer page so the alert problem’s gone? @nolimits4web thanks before

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows.history.back() + location.reload() jquery
window.history.back() breaks the javascript flow and redirects to previous page, location.reload() is never processed. location.reload() has to be ...
Read more >
JavaScript tips: js go back to the previous page and refresh
JavaScript tips: js go back to the previous page and refresh · 1. Page Automatic refresh: Add the following code to the <meta...
Read more >
How to go back one page and refresh with JavaScript
Let's say you want to have a link that sends the user back one page, but also refreshes the page so that last...
Read more >
Refresh the Page in JavaScript – JS Reload Window Tutorial
You can use the location.reload() JavaScript method to reload the current URL. This method functions similarly to the browser's Refresh button.
Read more >
Force refresh page when user taps browser back button
Hello! I have had to solve this issue in the past, specifically for Safari users since Safari slides back to the exit state...
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