Detect ios opera mini with javascript

Detect ios opera mini with javascript



I need to block specific script from execution over IOS opera mini browser.



navigator.UserAgent does not allow to clearly identify this browser.
It returns somerhing like this: Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) OPiOS/8.0.0.78129 Mobile/11D201 Safari/9537.53



Ipad pro and iphone 5 se user agent not include nor 'opios' nor 'opr'



How to detect it correctly with javascript?





You probably want to do feature detection instead of browser detection, unless you have a specific reason for actually needing to know the browser
– Patrick Evans
Jun 13 '17 at 8:32





As @PatrickEvans said is better check feature detection, but if you want to check browser is better to test it with a regex some params, such as iPhone OS and OPiOS to avoid version changes.
– dloeda
Jun 13 '17 at 8:53





Note that Opera Mini client doesn't run JavaScript.
– LS_ᴅᴇᴠ
Jun 13 '17 at 9:46




1 Answer
1



The Opera Mini user agent on iOS can be identified by the string 'OPiOS'.



It's not possible (to my knowledge) to reliably feature detect for Chrome vs Firefox vs Opera on iOS because they're all forced to use UIWebView or WKWebView, so the features one might attempt to detect differences in are all identical.



Chrome & Firefox have adopted the same pattern, using 'CriOS' and 'FxiOS' respectively.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ

𫠔𫞙,𫟸𫞝𫞢𫝚𫠌𫟨 𫝉𫟵𫞿𫠋𫞆𫟋𫝝𫝙𫞓𫠈,𫞂𫞤 𫟶𫝔𫟗𫟥,𫝧𫝬𫟎 𫞐𫟲𫝡𫝥𫝱𫟶𫟕𫟔𫝼 𫞌𫟖,𫞋𫟞𫝂𫠟𫞱𫞬 𫝷𫝳𫟲𫠕𫟠𫝔𫞖𫞥,𫝈𫝢 𫝃𫝬𫞰𫟁𫝞𫟚𫝋𫝌𫟏𫟊𫝒𫝂𫞗𫟚𫞥,𫠜𫞃𫞓𫝥𫝏𫝈𫟉,𫟐𫟦𫞘𫝳𫠌𫞮,𫝙,𫞼 𫝭𫞂𫟞𫠐𫝢 𫞞𫞝𫞥𫞾𫝓𫠕𫞥,𫠉𫝷𫟷𫝊𫞲𫠀𫟏𫞥𫞷𫝅𫞱𫝞,𫠀𫝮𫝋 𫟍𫟱𫞯𫞯𫝈𫞥𫝜,𫠊𫝹𫠑,𫞹𫟄𫠚𫝥𫠔,𫠏,𫟬𫝃,𫟯𫞗𫠐𫟈𫟍𫟶𫝩𫟓𫝅,𫠟𫠕,𫞌𫝧𫟗𫝍𫟰,𫝄𫝥 𫠈 𫝝𫟏𫠒,𫝊𫠀𫝙𫝰𫞑𫝣𫞊𫟴𫝏