Interapplication communication in JavaScript

How are we going to do interapplication communication between apps written in JavaScript running on the same machine?

I use localStorage

The client app stores a string in known location. The server watches that location. When a string shows up, convert it to uppercase, delete the string, and store the new string in another known location.

The client app is watching that location, when a value shows up, it displays it for the user.

A limit

There is a limit -- the two apps have to originate from the same domain, because only apps from the same domain can share space in localStorage.

Example app

The example app is in a GitHub repository.

Download the client and server and drag them into your browser.

Enter a string in the client. Click the Submit button. See the result.

Seeing is believing

Some people don't believe this works. It does.

I've deployed it in a real-world app, and there have been no support issues.

And with this demo, you can see with your own eyes.

Last built: Wed, Jul 9, 2014 at 11:23 AM

By Dave Winer, Saturday, April 12, 2014 at 10:10 AM. Yeah well, that's just, you know, like, your opinion, man.