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:
- Opera Mini JS has a limited DOM event
- No background scripting
- 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*
0 Responses to “Javascript check Opera Mini”