4

I'm trying to figure out how to open a connection to an external Socket.IO server every time the user visits a new page from a google chrome extension. This is my first extension, so it's a bit tough.

I tried using an iframe and the history.onVisit event, but no luck so far.

Techwraith
  • 1,298
  • 1
  • 10
  • 12

2 Answers2

0

After some research I realized that Socket.IO doesn't currently support cross-site connections. So that idea's out.

Techwraith
  • 1,298
  • 1
  • 10
  • 12
  • This is not correct, see: http://stackoverflow.com/questions/8970880/cross-domain-socket-io and http://socket.io/#faq for why, but to paraphrase: " Native WebSockets are cross-domain by design, socket.io serves a flash policy file for cross-domain flash communication, XHR2 can use CORS, and finally you can always use JSONP" – Shane Gadsby Jun 10 '14 at 02:22
0

socket.io does support cross-site connections using jsonp polling now or is that a new feature?

Alex Rashkov
  • 9,833
  • 3
  • 32
  • 58
Alfred
  • 60,935
  • 33
  • 147
  • 186