Simple IPC between local HTML5 App Instances Using Hash Routing


blog.chrisrussell.net

Consider the following little fragment of HTML:

<a href="./#/monitor2" target="monitor2" title="Open monitor #2 instance of #{appName}">Monitor #2</a>
<a href="./#/monitor3" target="monitor3" title="Open monitor #3 instance of #{appName}">Monitor #3</a>
<a href="./#/monitor3/run" target="monitor3" "test">Test directed at monitor 3</a>

Here I’m using a named target in my A tags to make an IPC request on another instance of my single page HTML5 application that’s running in another browser tab, or a completely different instance of the browser on localhost.

Although just implied by the trivial code above, whatever request you want can be serialized into a hash route and sent in this fashion. But that’s just one way!

Ah yes, but the requester can embed its own window target in the request and the receiver can respond in kind.

Local IPC via hash routes. That’s cool provided that your requests are small enough. (remember practical ~2K character limit on URI’s in the wild).

Of…

View original post 48 more words

Advertisements

2 thoughts on “Simple IPC between local HTML5 App Instances Using Hash Routing

  1. [url=http://megasto.com.ua]шиномонтажное оборудование б у в украине [/url] шиномонтажное оборудование б у цены продам шиномонтажное оборудование шиномонтажное оборудование в кредит шиномонтажное оборудование в украине шиномонтажное оборудование б у

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s