Reputation: 5047
What is the simplest way to send text data from chrome's javascript (running in a extension) and my external app? I saw XHR, but I don't want to use it cause it can be blocked by firewalls.
Upvotes: 1
Views: 1365
Reputation: 40179
You can implement HTML5 WebSockets. http://www.html5rocks.com/tutorials/websockets/basics/
On your external app, you define the WebSocket server (many many implementations out there for many languages). And you just connect through it in your Extension. You can specify any port you please by allowing your WebSocket to listen to it.
Upvotes: 0
Reputation: 111325
XHR is the way to go. It shouldn't be blocked by any firewall because it comes as a regular browser request, similar to retrieving external js file or image. Using anything else would look rather fishy.
Upvotes: 2