Communicate between client in Javascript without server
Asked Answered
D

1

7

I'm searching a way to communicate between two client in Javascript/HTML5, without using a server-side script. I can't use NodeJs for this.

Is there a way to connect two clients?

Dyun answered 7/11, 2013 at 20:26 Comment(5)
Have a look at WebRTC.Compony
I'm afraid this is impossible, see this stackoverflow questionGrizelda
@Severin: showing that one method doesn't work doesn't mean nothing will...Scree
Yeah, that's why I linked to a question about browser communication without a server in between in general like stated in the first sentence of the question (not the heading).Grizelda
Possible duplicate of Do websockets allow for p2p (browser to browser) communication?Rolfrolfe
M
0

What exactly are you trying to do? Can you use dependency injection?

I've had to do some workarounds in the past where I've opened windows or iframes into a target page using a url configured like a GET request, complete with a "?key=value" tacked onto the end. The target page has some vanilla javascript in it that looks for these faux GET requests, parses them, and either performs the requested action (fill out and submit a form or click a button or whatever) or uses the window.postMessage to send the requested information back to the original page.

Monometallic answered 15/6, 2019 at 5:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.