Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I establish a connection with other computer using JavaScript?

Is the following possible? There are 2 persons working on 2 different computers. Both are connected to the Internet. These users can communicate with each other using a JavaScript program run in a browser.

I do not want to use a server. I want to use a P2P approach and I am wandering if it is possible to do it with the JavaScript?

like image 938
Roman Avatar asked Feb 19 '10 14:02

Roman


1 Answers

No.

The same origin policy prevents JavaScript (in a webpage) from opening a connection to a host other than the one on which the page was served from.

like image 87
Quentin Avatar answered Sep 30 '22 02:09

Quentin