1

I have a progressive web app built using Angular and Ionic. I am trying to disable back button on Iphone but it has not worked at all. I have tried using the following:

  1. https://github.com/Zatikyan/angular-disable-browser-back-button
  2. Using Replace url when navigating to different page
  3. Explicitly setting window.history to null

None of these options have worked for me. Does anyone has any idea or any other options that we can try? or anyone has done similar to this?

Also, I would like to mention we would like to disable users moving the screen left and right using their fingers which is basically the back and forward button on Iphone safari?

Learn AspNet
  • 1,192
  • 3
  • 34
  • 74

1 Answers1

-1

You can remove the entire browser frame of the pwa by setting display to standalone in your manifest file.

Take a look at https://web.dev/add-manifest/

That will solve your browser backbutton problem.

Troels Lenda
  • 524
  • 2
  • 12
  • I can try this but will this fix the issue of user just moving the screen left and right using their fingers which is basically the back and forward button on Iphone safari? Have you done something to disable that? – Learn AspNet May 26 '21 at 13:40
  • No it won't. Users will still be able to navigate. This approach also only works when the PWA is installed. – rubenpoppe Jun 02 '21 at 14:09