Fix FireFox Startup Times On 2011r4.x

Changes in FireFox 11 introduced significant launch delays for Real Studio WE applications. Most users who noticed this change saw it first while trying to debug WE apps on their computers. The launch times are so long that the debugger will generally just give up. But there’s no reason to give up on FireFox.

This delay is due to changes in FireFox WebSockets and only affects WE stand alone applications, which includes any app in the debugger. The topic has come up on the forums here, and keeps popping up every few days on either the forum or the mailing list.

The post linked above offers two solutions to the problem. One solution involves editing a copy of Real Studio and solves the problem for all FireFox users connecting to your re-compiled stand alone apps. The other involves editing your FireFox settings but only solves the problem on your particular installation of FireFox. (Which is fine if your apps are deployed as CGIs and you just want to use the debugger.)

The problem with the first solution is that it disables WebSockets for all modern browsers and not just FireFox. It was originally a solution to WebSocket problems across all browsers on 2011r3. Here is an updated solution which only disables WebSockets for FireFox connections.

Following the instructions below could damage your installation of Real Studio and/or cause problems for users of your WE applications. Only perform the changes on a copy of your Real Studio application, and thoroughly test your re-compiled applications before deploying them.

I am not liable for any damages that result from using this patch. Use at your own risk!

With that out of the way here are the instructions for Mac OS X users with Real Studio 2011r4.x.

  • Make sure Real Studio is not running.
  • Find your Real Studio application.
  • Make a copy of it.
  • Right-click the copy and select “Show Package Contents”.
  • Navigate to: Contents > Resources > WebFrameworks > Global > framework.js
  • Open framework.js in a text editor.
  • Find the following code (around line 138):
// Communication functions RS.comm = {   begin: function () {     try {       if(RS.mode == 1) {
  • Replace the code with the following:
// Communication functions RS.comm = {   begin: function () {     try {       var objUserAgent = navigator && navigator.userAgent;       var bolFireFox = false;       if (objUserAgent != null && objUserAgent != undefined)         if (objUserAgent.match(/firefox/i) != null)           bolFireFox = true;       if(RS.mode == 1 && bolFireFox == false) {
  • Save changes.
  • Launch the copy of Real Studio that you just edited.
  • Test by launching an app in the debugger and connecting with FireFox.
  • Compile and deploy your stand alone WE apps after testing relevant use scenarios and browsers.

 
I should note that normally it is against license agreements to edit applications in this manner. But Real Software was very understanding about the initial posting of this fix. I decided to post this update because WE apps run incredibly well as stand alone apps served from a fast, dedicated server. For those of us using that option with clients it’s important to maintain WebSocket support on as many browsers as possible.
 
Hopefully the next version of Real Studio will fix this issue and restore WebSocket support on FireFox. I think I speak for everyone when I say that I am eager to see 2012r1.

Leave a Reply

Your email address will not be published. Required fields are marked *