Javascript check Opera Mini

So today I got caught on the weird-side of mobile web-development, that is to create consistent javascript on major mobile browsers. The good news is Android and IPhone are using webkit so it’s kind of easy. The Bad News is Opera Mini.

Don’t get me wrong, I love opera mini. But the different java-script engine behavior could cause headache sometimes. After googling for a while I stumbled on this http://dev.opera.com/articles/view/javascript-support-in-opera-mini-4/ that mention some things to consider:

  1. Opera Mini JS has a limited DOM event
  2. No background scripting
  3. Very limited AJAX support

And the most important thing is this snippet to check whether we are inside Opera Mini (of course you can use PHP or Server Side script as a better method)

is_operamini = Object.prototype.toString.call(window.operamini) === "[object OperaMini]";

So to avoid more headache, I just treat opera-mini as a non-javascript-capable browser *smirk*

Advertisement

0 Responses to “Javascript check Opera Mini”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




About The Blog

Trying to share many settings or programming problems that I find during my work-hours :)

The Writer

Erwin Maulana Saputra a Software Engineer who live in Indonesia, in love with this field since junior high-school while creating ASCII or 320x200, 256bit games :) and now somehow making money from web stuff *wink* Used to work at DotSeven and Mitrais and currently freelancing until January 2011
LinkedIn

 

December 2011
M T W T F S S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031  

Follow

Get every new post delivered to your Inbox.

Join 715 other followers