WebWorkers and WebSockets with Firefox - firefox

I'm trying to implement a working WebSocket connection within a WebWorker. That should be simple and it is if I use Chrome as b rowser. However, since this experiment should further become part of a production I need it to work on all the great Browsers, namely also Firefox.
My problem is that I can't get it working with Firefox. At first Firefox wasn't able to create a WebWorker. That was a Bug and is fixed with version 9. But now it seems that it wouldn't be able to create a WebSocket within the Worker.
I tried the following line of code:
var ws = new WebSocket(url);
which fails with:
WebSocket is not defined
Well, according to this it should work. But it doesn't, neither within the WebWorker nor outside of this context. I tried the older
var ws = new MozWebSocket(url);
which seems to work outside of the WebWorker but I get the same error as above within it.
Now, what's the problem? I know WebSockets where disabled byy default in some older versions but version 9 should support a similar functionality as Chrome (at least that's what they say on their side). So am I doing something wrong?
Im using Ubuntu 11.10 and did not test other browsers yet.
Thanks in advance!

There's no support for WebSocket in workers in Firefox yet. See https://bugzilla.mozilla.org/show_bug.cgi?id=504553
Update: Firefox 35 added support.

Related

VB6 Class does not support Automation or does not support expected interface

I have been facing this issue for a couple days now.
It seems that on a client site I am recieving the automation error. The line of code in where im 90% sure it is coming from is below:
Set oTemp = New cPMXMLParser
However in other functions I seen
Set m_oXml = CreateObject("PMXMLParser.cPMXMLParser")
Which is essentialy the same except for the binding.
Please note both works locally but not on client site I was thinking maybe a dependancy is missing but seems not ... does anyone have any information on this?
Would
Set m_oXml = CreateObject("PMXMLParser.cPMXMLParser")
Be the best option?

FBML based app suddenly stopped working since Nov.18,2011

My FBML based app suddenly stopped working since Nov.18.2011. It was working fine before that. And nothing has changed from our side. Could that be some of the new changes Facebookk put in on Nov.18 ( http://developers.facebook.com/blog/post/600/ ). Does anyone else has the similar problem? Any ideas on how to fix it?
Thanks a lot!
My FBML app stopped working around this day too. The problem is that they switched to the new auth system, where instead of sending the fb_sig HTTP parameters to identify the user and verify that the request came from Facebook, they now send one single parameter called signed_request. Which language/library are you using to interface with Facebook? See https://developers.facebook.com/docs/authentication/signed_request/ for more details on this new signed_request parameter.

Protocol Handlers in Chrome via Registry

For purposes of learning I have created an application which returns a computed output with HTTP protocol. To test that i'm calling in a web browser (IE, FF, Chrome) host with a port:
127.0.0.1:8764. This works on all of the web browsers that were listed earlier. Now i wanted to change the protocol handler to make my application more complex. So I have added a .reg with information about my 'unique' protocol called ProtocolDemoTest. Now when I want to run my application with following URL: ProtocolDemoTest:// I'm getting positive results only on IE and FF, but it seems to somehow fail on Chrome. I have searched a little and only found this http://www.google.fi/support/forum/p/Chrome/thread?tid=4e79db1b44daa2e6&hl=en which I find not exactly as i imagined. I want it to work on IE, FF, Chrome with only adding some data into the registry. Can you help me find an actual way to do this in ALL web browsers?
Support for registerProtocolHandler has now landed in Chrome 13 - http://crbug.com/73710 for more information.
The API you're looking for is this one: https://developer.mozilla.org/en/DOM/window.navigator.registerProtocolHandler
Though available in Chrome, the call doesn't do anything. This issue tracked here: http://crbug.com/44984
Implementation is underway. See this bug: http://crbug.com/73710

Allowing Cross domain ajax calls from firefox

I want to change the settings of firefox so as to allow it to make cross domain ajax calls. Since due to the security feature of the firefox it doen't allow ajax calls to be made. I know if it is in same domain it will allow. I have a code given bellow which in safari works fine but firefox doesn't display the results when it calls csce server then since the code is on local machine doesn't allow it and returns error. I know it will start working if I load my this code to csce server but I want to run the code from my machine. So can anyone help me in resolving this. I have spent past couple of days just searching for this solution.
Kindly suggest how to achieve this or should I go with some older version of firefox?
I googled and set the parameters of browser in config file as specified in this site but it still doesn't work.
http://code.google.com/p/httpfox/issues/detail?id=20
Maybe you could use privoxy and tell it to inject something like "Access-Control-Allow-Origin: *" in the server response.
To do this, you would have to go into the file user.filter (create it if it doesn't exist) in privoxys configuration directory and insert something like this:
SERVER-HEADER-FILTER: allow-crossdomain
s|Server: .*|Access-Control-Allow-Origin: *|
Instead of Server, you can also use any other header that's always present and you don't need.
And this into user.action:
{+server-header-filter{allow-crossdomain}}
csce.unl.edu
Note: I didn't test it.
https://developer.mozilla.org/En/HTTP_access_control
http://config.privoxy.org/user-manual/
This appears to enable XSS from file:// pages in Firefox 4, although it prompts you so might not be suitable for more than simple test pages:
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

Firefox WebSockets

I've read somewhere that the trunk version of Firefox already had a WebSocket implementation. Nevertheless, I've just tried the 3.7a4pre without success. It still
gives me the old "WebSocket is not defined" error message. Am I confused with WebWorkers?
Using a flash-based WebSocket implementation is not an option.
Please advice.
According to bug 472529 a patch has not yet been applied to trunk.
WebSocket (both the API and the wire protocol) are still in draft, so we're a way off yet.
Using a flash-based WebSocket implementation is not an option.
I'm afraid a fallback (Flash, Java, XMLHttpRequest long-polling etc.) is your only option in Firefox for now. The only browser that currently has native WebSocket is Chrome.
WebSockets has been just landed on Firefox trunk.
WebSockets disabled in Opera and Firefox 4: http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/
They are called MozWebSockets on Firefox since v4
Check out the Mozilla Websocket Reference
Since Firefox supports WebSockets not strictly to official standards it had prefix "Moz", so you have to check if WebSocket is existing object, if yes use it, if no check MozWebSocket, if yes, then use it.
Since Firefox 11, they do support WebSockets without prefix, so it is the same as in Chrome now.

Resources