Html5 page return mechanism solution, html5 Mechanism Solution
Response scenarios to be processed:
1. Normal a-> B-> c
2. the button on the page needs to be logged on
3. Page jump requires login
4. modifiable parts on the page (for example, the address page can also be added, deleted, modified, and queried)
The overall principle is that the original road is back to the original road
The first scenario does not need to be considered, history. go (-1) is OK. After logging in to the second scenario, use history. go (-1), the third scenario is complex. After successful login, you must modify the url of the current page and reload it again. For the fourth scenario, the difficulty is that you need to return to the home page after selecting the address and add the corresponding parameters to the home page. Put the parameters in localstorage and replaceStatus to replace the current url.
Another elegant way is to make login and so on into a pop-up box, which can perfectly avoid various return problems. Component development.