17
Views
1
Comments
Is there any way to restrict the browser navigation to the iframe
Question
Application Type
Reactive

Hi all , 
i need to know about that , is ther any way to restrict the backnagivation browser button to the Iframe , when i load a react native webpage in the iframe , even I use the sandbox attribute but still not works

2023-08-28 07-00-10
Paulo Torres
Champion

Hi,

It’s not possible to fully control the browser’s back button. While you can attempt to influence its behavior using JavaScript (for example, with history.pushState), it’s not a reliable or recommended way to prevent navigation.

In practice, achieving the exact behavior you’re describing isn’t feasible due to browser limitations.

Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.