Flock 0.8 Is Looking Pretty Darn Good

interesting read on a good browser
and of interest to you also polonus ::slight_smile:
http://tech.cybernetnews.com/2007/05/17/flock-08-is-looking-pretty-darn-good/

Hi Dan,

I am testing the Flock 0…8 Cormorant. Important migrating info here: http://wiki.flock.com/index.php?title=Cardinal_Profile_Migration , else you might loose your existing profile. Flock 0.8 pre-release is built on top of FF. 2.0. But testers have to store their Flock 0.7.13 separately against conflicts. I found the Flock code versy versatile when I brought my personal code into this browser, more adaptable than FF ever was. For instance this script in the components folder:ajaxCaller.JS

var ajaxCaller = {

  shouldDebug: false,
  shouldEscapeVars: false,
  shouldMakeHeaderMap: true,

  calls : new Array(),
  pendingResponseCount : 0,

   /**************************************************************************
      PUBLIC METHODS
   *************************************************************************/

  getXML: function(url, callbackFunction) {
    this.get(url, null, callbackFunction, true, null);
  },

  getPlainText: function(url, callbackFunction) {
    this.get(url, null, callbackFunction, false, null);
  },

  postForPlainText: function(url, vars, callbackFunction) {
    this.postVars(url, vars, null, callbackFunction, false,
                    null, "POST", null, null, null);
  },

  postForXML: function(url, vars, callbackFunction) {
    this.postVars(url, vars, null, callbackFunction, true,
                    null, "POST", null, null, null);
  },

  get: function(url, urlVars, callbackFunction, expectingXML, callingContext) {
    this._callServer(url, urlVars, callbackFunction, expectingXML,
                    callingContext, "GET", null, null, null);
  },

  postVars:
    function(url, bodyVars, optionalURLVars, callbackFunction, expectingXML,
             callingContext) {
      this._callServer(url, optionalURLVars, callbackFunction, expectingXML,
                      callingContext, "POST", bodyVars, null, null);
  },

  postBody:
    function(url, optionalURLVars, callbackFunction, expectingXML,
             callingContext, bodyType, body) {
      this._callServer(url, optionalURLVars, callbackFunction, expectingXML,
                      callingContext, "POST", null, bodyType, body);
  },

  putBody:
    function(url, optionalURLVars, callbackFunction, expectingXML,
             callingContext, bodyType, body) {
      this._callServer(url, optionalURLVars, callbackFunction, expectingXML,
                      callingContext, "PUT", null, bodyType, body);
  },

  options:
    function(url, optionalURLVars, callbackFunction, expectingXML,
             callingContext, bodyType, body) {
      this._callServer(url, optionalURLVars, callbackFunction, expectingXML,
                      callingContext, "OPTIONS", null, bodyType, body);
  },

  trace:
    function(url, optionalURLVars, callbackFunction, expectingXML,
             callingContext, bodyType, body) {
      this._debug("trace");
      this._callServer(url, optionalURLVars, callbackFunction, expectingXML,
                      callingContext, "TRACE", null, bodyType, body);
  },

  deleteIt: function(url, urlVars, callbackFunction,
                     expectingXML, callingContext) {
    this._callServer(url, urlVars, callbackFunction, expectingXML,
                    callingContext, "DELETE", null, null, null);
  },

  head: function(url, urlVars, callbackFunction, expectingXML, callingContext)
  {
    this._callServer(url, urlVars, callbackFunction, expectingXML,
                    callingContext, "HEAD", null, null, null);
  },

  /**************************************************************************
     PRIVATE METHODS
  *************************************************************************/

  _callServer: function(url, urlVars, callbackFunction, expectingXML,
                       callingContext, requestMethod, bodyVars,
                       explicitBodyType, explicitBody) {

    if (urlVars==null) {
      urlVars = new Array();
    }

    this._debug("_callServer() called. About to request URL\n"
                + "call key: [" + this.calls.length + "]\n"
                + "url: [" + url + "]\n"
                + "callback function: [" + callbackFunction + "]\n"
                + "treat response as xml?: [" + expectingXML + "]\n"
                + "Request method?: [" + requestMethod + "]\n"
                + "calling context: [" + callingContext + "]\n"
                + "explicit body type: [" + explicitBodyType + "]\n"
                + "explicit body: [" + explicitBody + "]\n"
                + "urlVars: [" + util.describe(urlVars) + "]\n"
                + "bodyVars: [" + util.describe(bodyVars) + "]"
              );


    var xReq = this._createXMLHttpRequest();
    xReq.onreadystatechange = function() {
      ajaxCaller._onResponseStateChange(call);
    }

    var call = {xReq: xReq,
                callbackFunction: callbackFunction,
                expectingXML: expectingXML,
                callingContext: callingContext,
                url: url};

    if (urlVars!=null) {
      var urlVarsString = this._createHTTPVarSpec(urlVars);
      if (urlVarsString.length > 0) { // TODO check if appending with & instead
        url += "?" + urlVarsString;
      }
    }

    xReq.open(requestMethod, url, true);

    if (   requestMethod=="GET"
        || requestMethod=="HEAD"
        || requestMethod=="DELETE") {
      this._debug("Body-less request to URL " + url);
      xReq.send(null);
      return;
    }

    if (   requestMethod=="POST"
        || requestMethod=="PUT"
        || requestMethod=="OPTIONS"
        || requestMethod=="TRACE") {
      bodyType = null;
      body = null;
      if (explicitBodyType==null) { // It's a form
        bodyType = 'application/x-www-form-urlencoded; charset=UTF-8';
        body = this._createHTTPVarSpec(bodyVars);
      } else {
        bodyType = explicitBodyType;
        body = explicitBody;
      }
      this._debug("Content-Type: [" + bodyType + "]\nBody: [" + body + "].");
      xReq.setRequestHeader('Content-Type',  bodyType);
      xReq.send(body);
      return;
    }

    this._debug("ERROR: Unknown Request Method: " + requestMethod);


  },

  // The callback of xmlHttpRequest is a dynamically-generated function which
  // immediately calls this function.
  _onResponseStateChange: function(call) {

    xReq = call.xReq;

    if (xReq.readyState < 4) { //Still waiting
      return;
    }

    if (xReq.readyState == 4) { //Transmit to actual callback
      this._debug("Call " + util.describe(call)
                + " with context [" + call.callingContext+"]"
                + " to " + call.url + " has returned.");
      callbackFunction = call.callbackFunction;
      if (!callbackFunction) { // Maybe still loading, e.g. in another JS file
        setTimeout(function() {
          _onResponseStateChange(call);
        }, 100);
      }
      var content = call.expectingXML ? xReq.responseXML : xReq.responseText;
      responseHeaders = xReq.getAllResponseHeaders();
      headersForCaller = this.shouldMakeHeaderMap ?
        this._createHeaderMap(responseHeaders) : responseHeaders;
      callbackFunction(content, headersForCaller, call.callingContext);
    }

    call = null; // Technically the responsibility of GC
    this.pendingResponseCount--;

  },

  // Browser-agnostic factory function
  _createXMLHttpRequest: function() {
    if (window.XMLHttpRequest) {
      return new XMLHttpRequest();
    } else if (window.ActiveXObject) {
      return new ActiveXObject('Microsoft.XMLHTTP')
    } else {
      _error("Could not create XMLHttpRequest on this browser");
      return null;
    }
  },

  _createHTTPVarSpec: function(vars) {
      var varsString = "";
      for( key in vars ) {
        var value = vars[key];
        if (this.shouldEscapeVars) {
          escapePlusRE =  new RegExp("\\\+");
          value = value.replace(escapePlusRE, "%2B");
        }
        varsString += '&' + key + '=' + value;
      }
      if (varsString.length > 0) {
        varsString = varsString.substring(1); // chomp initial '&'
      }
      this._debug("Built var String: " + varsString)
      return varsString;
   },

  /* Creates associative array from header type to header */
  _createHeaderMap: function(headersText) {
    extractedHeaders = headersText.split("\n");
    delete extractedHeaders[extractedHeaders.length]; // Del blank line at end
    headerMap = new Array();
    for (i=0; i<extractedHeaders.length-2; i++) {
      head = extractedHeaders[i];
      fieldNameEnding = head.indexOf(":");
      field = head.substring(0, fieldNameEnding);
      value = head.substring(fieldNameEnding + 2, head.length);
      value = value.replace(/\s$/, "");
      headerMap[field] = value;
    }
    return headerMap;
  },

  _debug: function(message) {
      if (this.shouldDebug) {
        alert("AjaxJS Message:\n\n" + message);
      }
  },

  _error: function(message) {
      if (this.shouldDebug) {
        alert("AjaxJS ERROR:\n\n" + message);
      }
  }

};


polonus

thanks polonus for that info-Flock 0…8-is that a beta testing version or a final version ???

Hi drhayden1,

It is just the next version that comes out of the Flock cereal box, it is the pre-release before the Daphne version is to be launched. But they made the switch from the Cardinal version, based on Firefox 1.5.0 to this one based on FF 2.0.3 recently. Whenever we see a stable user version within our lifetime is a big question to me. Launched from a Californian garage-box by some enthusiastic coders, and I was among the first adopters of this Web 2.0 browser, when it appeared on the Internet (also Greg here on the forum was one of the first Flock-braves), we have found for one reason or other that Flock did not get to the final version. Why? Well they have the developing funds from Besemer’s, there is big coal money there to eventually launch it. I do not know what it is that is holding a more rapid launch back? They associate themselves with Yahoo, like FF with Google. Recently FF coders tried to cap Flock’s main features and clip its feathers by launching “the coop”. When the final version will be launched, they promished to do that a long time ago, and still we wait, and wait, and wait…
I liked the browser because I became one of the security testers, I worked the Flock 0.7.13 browser completely around introducing a lot of personal code to go inside it, even to an extent that I have an unidentified browser now or NaN (No IDN) version running from my USB stick (pocket version), and my browser now weighs 100 MB, and is quite stable and fast running. Not that fast like sleipnir for instance, because that is just a shell built on top of IE7 with a Gecko end.
I tested the burning edge versions of the Mozilla browser, but these newest version did not support enough security add-ons, so I left it, but the burning edge bugfix codes were all implemented (whenever they were appropiate) into my personal NaN (Flock 7.13.1 nightly built). So I am now out to transmigrate to Flock 0.8 in the Polonus’ configuration version. I report here later of my findings.
I also did a couple of month’s leak monitor testing with Flock, but with extensions the same results as with FF.

polonus

as always thanks for the in-depth and book length info on my question damian
haven’t decided yet to install flock again or not ???
have avant,firefox and opera browsers already i use
and don’t want to have an overkill of browsers ::slight_smile:

click on pic to animate…

Hi drhayden1,

And right you are - overkill and overbloatedness is wrong. I have sleipnir, flock and opera on my system.
And only use these in a pocketversion from USB. The defauilt browser is IE7, but this sits obly idle and is frequently patched. I decided for flock against FF because I had minimal crashes or problems with Flock, and could not say that of FF. What I liked about Flock as well that you could force all kind of FF-extensions on it, even when they were not specifically coded for Flock (at first you had to port them specifically with a special tool). sleipnir came in sight because of the way this browser shows webpages with all the features intended and coded for IE, so there you feel what is blurred by the security settings of Flock.

polonus

will just keep what i have at the present damian-happy with what i am using and all.
maybe someday down the road for flock ??? ::slight_smile:

Hi drhayden1,

I have fired up the sulfur. Have to wait for some add-ons to be adopted for it. DrWeb cannot be installed, had to re-install from scratch, but I so grateful I had all my extensions and profile etc. saved with the Febe extension. Those are the little contra’s. With Adblock Plus only, some went unnoticed, because could not install the G-Updater, so installed Admuncher and that cow is now eating all and every ad in the webpages I browse. With No-Script installed I am rather happy with this browser.
Now the pro’s, more features text-editing on board and dictionairy on the fly, more interoperability, better webpage rendering, full fletched necko support and XML-XPCOM. The 0.7.13 was good, this is better looking,

polonus

glad to hear it was a success and all damian :slight_smile:
click on to animate ::slight_smile:

Hi drhayden1,

I have TrustWatch now combined with finjan. Stealther on, Cookie editor, NoScript. so there is now ample security in the Flock browser. AdBlockPlus is combined with AdMuncher that eats away at all my browsers’ ads and banners, so that is 99% covered.

polonus