Reputation: 558
What is the most solid way to check whether a user is on a webview inside a App or another web browser?
We can get details of the OS running using javascript window.navigator.userAgent, but is there a way to specifically identify whether user is using a webview or a web browser?
Upvotes: 1
Views: 2605
Reputation: 558
Following simple check worked out for a webview inside android application, not sure how it'll work on IOS though,
if( navigator.userAgent.includes ('wv')){
//Inside the webview
}else{
//Not a webview
}
Upvotes: 2