code: function (url) {
              var ret = true, xhr;
              try {
                  // try the lowest footprint synchronous request to specific url.
                  xhr = new XMLHttpRequest();
                  xhr.open("HEAD", url, false);
                  xhr.send();
              } catch (e) {
                  ret = false;
              }
              return ret;
          }
docs: test - do a network test with a synchronous call.
  @param url to test.