From page A to page B issues need to refresh the data.
For example, after a successful save data A page B need to jump to the page. Intermediate use Ajax.
- First, the success of Ajax to save data A place settings page:
1 sessionStorage.setItem("need-refresh", true);
sessionStorage: Create a local store, it is in the form of key-value pairs.
- In the B page
1 $(document).ready(function (e) { 2 window.addEventListener("pageshow", function () { 3 if (sessionStorage.getItem("need-refresh")) { 4 location.reload(); 5 sessionStorage.removeItem("need-refresh"); 6 } 7 }); 8 });