user2589306
user2589306

Reputation: 1

Ajax refresh div not working in Opera Mini

Loading updated content every 15 seconds in to "MyDiv":

$.ajaxSetup ({
    cache: false
});

setInterval(function(){
    $('#MyDiv').load('content.php');
}, 15000);

Not working on Opera Mini.

Upvotes: 0

Views: 918

Answers (1)

Alex
Alex

Reputation: 11245

Opera Mini just get the render result from server in OBML format and display it. Server where OBML has prepared can support delay javascript code like setInterval, but there is the time limits, which are different from one version to another:

  • Opera Mini v.4 javascript timer limit is near 2 secs
  • Opera Mini v.5 javascript timer limit is near 3 secs
  • Opera Mini v.7 javascript timer limit is near 5 secs

After this limit, all timers are ignored and page send from server to Opera Mini. In this limit your request must get the answer and complete all its callbacks. But where is no guarantee that all you requests will be faster than limit. So using ajax in timers for Opera Mini is a bad way.

P.S. All timers are from my experience and from dev.opera.com

Upvotes: 1

Related Questions