Cross domain in IE 6 and 7 and Opera

327 views
Skip to first unread message

Shannon -jj Behrens

unread,
Dec 9, 2010, 4:04:10 PM12/9/10
to sock...@googlegroups.com

Has anyone tested cross domain support recently with IE 6 and 7 and Opera?  I can get all the other modern browsers to work, but I'm having a hard time with those three.  They keep giving me permission issues.

It'd be really great if there was a document devoted to cross domain issues.  It could cover all the things you need to do and which transports would be used for which browsers.

Thanks,
-jj

Arnout Kazemier

unread,
Dec 9, 2010, 4:19:16 PM12/9/10
to sock...@googlegroups.com
Socket.io uses feature detection not browser sniffing. So it's hard to say what is supported in each browser as it can differ per user. And what kind of permission isues are you receiving? 

Shannon -jj Behrens

unread,
Dec 9, 2010, 7:24:09 PM12/9/10
to sock...@googlegroups.com
In Opera 9.6, I see:

Security violation
 Line 844 of linked script http://my_node_server/socket.io/socket.io.js
 this._xhr.send();

My buddy Jeff Lindsay and I put together a system to test out whether different browsers work, and I'm using it with crossbrowsertesting.com.  Here are my results so far:

Diagnosticator

chrome 6

  • windows : xhr-polling success 17 hours, 50 minutes ago (2 total)

chrome 8

  • windows : websocket success 17 hours, 16 minutes ago (1 total)
  • linux : websocket success 0 minutes ago (3 total)

explorer 6

  • windows : htmlfile failure 17 hours, 23 minutes ago (1 total)

explorer 7

  • windows : htmlfile failure 17 hours, 25 minutes ago (1 total)

explorer 8

  • windows : htmlfile success 17 hours, 50 minutes ago (4 total)

firefox 3.5

  • windows : xhr-multipart success 17 hours, 48 minutes ago (3 total)

firefox 3.6

  • windows : xhr-multipart success 17 hours, 47 minutes ago (4 total)

opera 9.63

  • linux : xhr-polling failure 17 hours, 27 minutes ago (2 total)

opera 9.64

  • windows : xhr-polling failure 17 hours, 17 minutes ago (2 total)

safari 4

  • windows : xhr-polling success 17 hours, 54 minutes ago (1 total)

safari 5

  • windows : xhr-polling success 17 hours, 49 minutes ago (1 total)
I had a problem getting IE 8 to work, and it went away after I added a DTD to the document.

Thanks,
-jj
--
In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa
http://jjinux.blogspot.com/

Guillermo Rauch

unread,
Dec 9, 2010, 7:28:32 PM12/9/10
to sock...@googlegroups.com
HTMLFile doesn't work over cross domain unless it's a subdomain, in which case we can use the `document.domain` hack (which I don't believe we're using?)

I'm very much interested in setting up automated testing, potentially through SauceLabs (although they charge money for non-Firefox/Linux browsers)

--
Guillermo Rauch
http://devthought.com

Shannon -jj Behrens

unread,
Dec 9, 2010, 7:36:22 PM12/9/10
to sock...@googlegroups.com
On Thu, Dec 9, 2010 at 4:28 PM, Guillermo Rauch <rau...@gmail.com> wrote:
HTMLFile doesn't work over cross domain unless it's a subdomain, in which case we can use the `document.domain` hack (which I don't believe we're using?)

Uh oh!  I'd really love it if the list of things like this were in a document somewhere ;)
 
I'm very much interested in setting up automated testing, potentially through SauceLabs (although they charge money for non-Firefox/Linux browsers)

I got that working.  It wasn't that great.  For some reason, a lot of things don't work in SauceLabs even though they do work with a normal browser.  I wrote a Python test that goes through a bunch of browsers on SauceLabs and phones home with the results of whether each browser was able to talk to the server.  A ton of browsers failed even though I know they would normally succeed (despite the fact that I set the timeouts very high, etc.).

I'll tell you what has worked.  I created an account on crossbrowsertesting.com.  I start by generating screen shots for every browser as it tries to talk to my test page (which phones home success or failure).  (Make sure you set the delay time to 30 seconds in the advanced properties.)  Some browsers I tried manually using VNC.

My buddy Jeff also tried SauceLabs separate of me, and he wasn't very successful either.  I'm not sure why it doesn't seem to work as well.

-jj

Shannon -jj Behrens

unread,
Dec 9, 2010, 7:37:38 PM12/9/10
to sock...@googlegroups.com
On Thu, Dec 9, 2010 at 4:28 PM, Guillermo Rauch <rau...@gmail.com> wrote:
HTMLFile doesn't work over cross domain unless it's a subdomain, in which case we can use the `document.domain` hack (which I don't believe we're using?)

Wait a second, if that's true, how come the following works:

explorer 8

  • windows : htmlfile success 17 hours, 50 minutes ago (4 total)
 htmlfile works in IE 8, but not 7 or 6.  In all 3 cases, I'm not using a subdomain.

-jj

Guillermo Rauch

unread,
Dec 9, 2010, 7:39:54 PM12/9/10
to sock...@googlegroups.com
That's very intriguing. Are you sure you're testing over cross domain, and the failures of 7 and 6 are not just related to something else?

Shannon -jj Behrens

unread,
Dec 9, 2010, 8:46:13 PM12/9/10
to sock...@googlegroups.com
On Thu, Dec 9, 2010 at 4:39 PM, Guillermo Rauch <rau...@gmail.com> wrote:
> That's very intriguing. Are you sure you're testing over cross domain, and the failures of 7 and 6 are not just related to something else?

My test is on http://staging.24hrdiner.com:8001/.
Node.JS is running on http://staging.24hrdiner.com:8002/.
It phones home to http://staging.24hrdiner.com:8000/.

Notice that those are all separate ports, so they count as separate
domains, I do believe.

I finally figured out how to turn on errors in IE 7. All it says is
"Permission denied. Line 726." It doesn't really tell me which file
that refers to ;) It's possible that it's related to something else,
but I'm not sure what that would be. That's why I asked if anyone had
gotten IE 6 and 7 working cross domain recently.

(The site won't be up forever. It's just an ssh tunnel back to my laptop.)

Thanks!

Shannon -jj Behrens

unread,
Dec 9, 2010, 8:52:50 PM12/9/10
to sock...@googlegroups.com
Actually, I think line 726 refers to the following:

HTMLFile.prototype._destroy = function(){
if (this._iframe){
this._iframe.src = 'about:blank'; // HERE
this._doc = null; // OR HERE
CollectGarbage();
}
};

I've seen that error before.

By the way, here are the Socket.IO log messages:

9 Dec 17:43:49 - Initializing client with transport "flashsocket"
9 Dec 17:43:49 - Client 18826152430847287 connected
9 Dec 17:43:54 - Client 18826152430847287 disconnected
9 Dec 17:43:54 - Client 5094323246739805 disconnected
9 Dec 17:43:54 - Initializing client with transport "htmlfile"
9 Dec 17:43:54 - Client 6158806204330176 connected
9 Dec 17:43:59 - Initializing client with transport "flashsocket"
9 Dec 17:43:59 - Client 398095314623788 connected
9 Dec 17:44:04 - Client 398095314623788 disconnected
9 Dec 17:44:04 - Client 6158806204330176 disconnected
9 Dec 17:44:04 - Initializing client with transport "htmlfile"
9 Dec 17:44:04 - Client 20900959405116737 connected
9 Dec 17:44:22 - Client 20900959405116737 disconnected
9 Dec 17:47:04 - Initializing client with transport "websocket"
9 Dec 17:47:04 - Client 7320398830343038 connected

Notice it keeps bouncing back and forth between transports. In the
browser, I never see the "Connected" event.

Thanks,
-jj

Shannon -jj Behrens

unread,
Dec 9, 2010, 9:12:17 PM12/9/10
to sock...@googlegroups.com
By the way, here's what Opera 9.6 says:

Security violation
Line 844 of linked script http://my_node_server/socket.io/socket.io.js
this._xhr.send();

-jj

Shannon -jj Behrens

unread,
Dec 9, 2010, 10:23:07 PM12/9/10
to sock...@googlegroups.com
If I switch to using a different domain rather just a different port, Socket.IO behaves differently.  It tries jsonp-polling in addition to flashsocket.  I still can't get it to work on IE 7 or Opera, though.  By the way, I'm using a checkout from yesterday.  I noticed that the most recent release on npm is 0.6.1.  Should I switch to that?

Here are my current results:

Diagnosticator

chrome 6

  • windows : xhr-polling success 21 hours, 4 minutes ago (2 total)

chrome 8

  • mac : websocket success 1 hour, 29 minutes ago (1 total)
  • windows : websocket success 20 hours, 30 minutes ago (1 total)
  • linux : websocket success 18 minutes ago (9 total)

explorer 6

  • windows : jsonp-polling failure 13 minutes ago (1 total)
  • windows : htmlfile failure 43 minutes ago (2 total)

explorer 7

  • windows : jsonp-polling failure 2 minutes ago (2 total)
  • windows : htmlfile failure 26 minutes ago (8 total)

explorer 8

  • windows : htmlfile success 2 hours, 54 minutes ago (6 total)

firefox 3.5

  • windows : xhr-multipart success 21 hours, 2 minutes ago (3 total)

firefox 3.6

  • windows : xhr-multipart success 21 hours, 1 minute ago (4 total)

opera 8.02

  • windows : xhr-polling failure 42 minutes ago (1 total)

opera 9.63

  • linux : xhr-polling failure 20 hours, 41 minutes ago (2 total)

opera 9.64

  • windows : jsonp-polling failure 8 minutes ago (2 total)
  • windows : xhr-polling failure 3 hours, 4 minutes ago (4 total)

opera 9.8

  • windows : jsonp-polling failure 5 minutes ago (2 total)

safari 4

  • mac : xhr-polling success 2 hours, 55 minutes ago (1 total)
  • windows : xhr-polling success 21 hours, 8 minutes ago (1 total)
  • mac : flashsocket success 2 hours, 55 minutes ago (1 total)

safari 5

  • windows : xhr-polling success 21 hours, 3 minutes ago (1 total)
Thanks,
-jj

Nickolay Platonov

unread,
Dec 13, 2010, 10:51:16 AM12/13/10
to sock...@googlegroups.com
@Shannon Could you elaborate on your testing methodology? Notably what this line actually mean:


windows : xhr-polling success 21 hours, 4 minutes ago (2 total)

Do you test the stress load? And whats you node version btw?

Thanks, Nickolay

Nickolay Platonov

unread,
Dec 13, 2010, 10:54:41 AM12/13/10
to sock...@googlegroups.com
The reason I'm asking is that I'm experiencing sporadic disconnections under stress load (4 clients in the same browser), my test suite randomly passes in 50% of cases..

Pyked Out

unread,
Dec 13, 2010, 2:11:56 PM12/13/10
to sock...@googlegroups.com
@Nickolay

Are you testing with IE? If so you should check out http://msdn.microsoft.com/en-us/library/cc304129(v=vs.85).aspx. Basically there is a hardcap on number of open connections in IE.

Nickolay Platonov

unread,
Dec 13, 2010, 2:33:15 PM12/13/10
to sock...@googlegroups.com
On Mon, Dec 13, 2010 at 10:11 PM, Pyked Out <pyke...@gmail.com> wrote:
@Nickolay

Are you testing with IE? If so you should check out http://msdn.microsoft.com/en-us/library/cc304129(v=vs.85).aspx. Basically there is a hardcap on number of open connections in IE.


Nope - in FF using "xhr-multipart" transport. I'm confused that results are not stable - sometimes suite passes and sometimes not. And it always passes in Chrome with websockets transport (even with 10 clients).

Shannon -jj Behrens

unread,
Dec 13, 2010, 7:10:36 PM12/13/10
to sock...@googlegroups.com
I'm not doing any stress testing or load testing yet. I'm using Node
0.2.4 and a checkout of Socket.IO from last week.

Here's my methodology:

* I can load a page using a variety of browsers using
crossbrowsertesting.com. I can either use VNC to control the
browsers, or I can tell a bunch of browsers to load the page, wait 30
seconds, and then take a screenshot (that I ignore).

* The page I'm loading is called "diagnostic". It tries to send a
message to my socket.io server listening on a different port. If it's
able to send a message and receive the same message, it sends a
message to another app called "diagnosticator". If there are timeouts
when trying to connect or send a message, it tells that to
"diagnosticator".

* The final app is "diagnosticator". It just keeps track of the
messages sent to it, basically remembering which browsers worked and
which didn't.

If diagnostic sees a successful or unsuccessful connection, it tells
diagnosticator. I get the transport from socket.transport.type. I'm
not configuring which transport to use. Presumably, if there is a
failure, socket.io may have tried several transports.

Best Regards,
-jj

Reply all
Reply to author
Forward
0 new messages