Return to the previous page and automatically refresh the JavaScript code

  • 2020-03-30 01:47:09
  • OfStack

In JavaScript, history.go(-1) and history.back() are commonly used

But if the page is returned or the data is in the cache, the updated data cannot be immediately rendered

All you have to do here is use a simple javascript statement to go back to the previous page and refresh the page
location.href = document.referrer;//Reload the previous page

Related articles: