0

I have a weird problem with a browser "back" button in Firefox and Safari. The thing is, that if I enter a website home page, then click on any link in navigation, and then press the "back" button, it throws me not on a home page, where I previously was, but on a browser's start page. It works normally, if I navigate for example from "shop" to "about us" section and then press back,

but when scenario is like: shop -> home -> about us -> back, it throws me on a "shop", not on "home"

in Chrome, Opera, IE11, Edge it works as it should, only Safari and Firefox have such problem. I am using Angular JS, the back-end is built on WordPress.

Any suggestions ?

1 Answers1

0

Its with SPA I guess.Also, you cannot touch the back button, since it is not on DOM . However, you can check for the web browser and you can create your own button function and provide functionality like : How to detect Safari, Chrome, IE, Firefox and Opera browser? and then use :

 function goBack() {
   window.history.back();
 }
Ankush Verma
  • 683
  • 6
  • 15