I have an html-javascript
page, and I need to detect whenever it open on web view (Like inside facebook webview, twitter webview, etc.), and if it a webview - displ
The info others provided in this thread gave me what I needed to solve this problem in my case. For others, here is the resulting JS regex which represents the detection described in the accepted answer:
/(Version\/\d+.*\/\d+.0.0.0 Mobile|; ?wv|(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari))/i.test(navigator.userAgent)
The regex includes cases for old Android, new Android, iOS versions.