Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Browser 7.3 XMLHttpRequest Issue (Known Issue)

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All devices with Browser 7.3
Platform(s): Symbian^3, Symbian S60 5th Edition, Symbian S60 3rd Edition FP2
Created: User:Nokia Developer KB (23 Aug 2011)
Last edited: lpvalente (16 Jun 2012)


When a Symbian Web Runtime widget, started from the Applications menu, is trying to access the internet for the first time, an 'Allow connection to Network?' prompt is shown. In previous browser versions, answering 'No' fires an onoffline event and XMLHttpRequest completes with status code 0. In Browser 7.3, denying network access fires an onoffline event, but XMLHttpRequest does not complete.


The solution is to implement a timer that aborts the XMLHttprequest if it is taking too long to complete. This will ensure that the request won’t be left hanging forever. Also, please note that usage of online/offline API is recommended in all WRT widgets.

var timeOutDelay = 10000; // 10 sec
var timerId;
var xmlHttpRequest = new XMLHttpRequest();"GET", "", true);
xmlHttpRequest.onreadystatechange = function(){
if (xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200) {
timerId = setTimeout(xmlHttpRequestOnTimeOut, timeOutDelay);
function xmlHttpRequestOnTimeOut(){
alert("XMLHttpRequest timed out");
This page was last modified on 16 June 2012, at 13:04.
66 page views in the last 30 days.