Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHARED: How To Detect Opera Mini Version
99% of the time, you should use feature detection to determine whether a browser supports a particular feature or API.

Yet sometimes browser sniffing is the right choice. There are two approaches you can take to detect Opera Mini.

You can:
• Examine the user agent string
• Check for the presence of the operamini object Using the user agent string

As with most browsers, Opera Mini identifies itself through the navigator object, and its userAgent property. Its user agent string adheres to the following pattern:


To detect whether a particular request is (presumably) from Opera Mini, check for the presence of Opera Mini in the user agent string. An example follows.
PHP Code:
var isOperaMini = (navigator.userAgent.indexOf'Opera Mini' ) > -); 

Detecting Opera Mini Using the window.operamini property
Opera Mini also includes an operamini object as a property of the window object. To check for the presence of this object, use the following code.
PHP Code:
var isOperaMini Object === "[object OperaMini]"

Using Navigator's User-Agent
Unfortunately, navigator.appVersion is not an accurate way to determine which version of Opera you’re using (here’s why). Instead, you’ll need to parse the value of the navigator.userAgent string.
An example using regular expressions is shown below.
PHP Code:
var operaVersion navigator.userAgent.match( /Version\/([1-9]+\.[0-9]{2})/ )[1]; 


@dealwap, @laive, @deelino, @dynamo, @hackinubee, @abscheat, @cavdy
CEO of Forgenest Inc.
[-] The following 4 users Like jonath45's post:
  • Cavdy, dealwap, Hackinubee, ibraheem
Nice tut bro, This could be useful. Smile
Posting From
[-] The following 1 user Likes Dynamo's post:
  • jonath45
Good one

Possibly Related Threads...
Thread Author Replies Views Last Post
  SHARED: Zero Javascript. Detect Any Mobile Device, Pc, Or Browser. Ahkohd 1 454 07-26-2016, 05:17 PM
Last Post: dealwap

Users browsing this thread: 2 Guest(s)

About Nigeria's Creative Talents

Nigeria's Creative Talents is an online community where every creative Nigerians can share ideas with themselves.

For any more information, please use our contact form.

              User Links