I have a device in the local-network which serve data using API over http. and a web application that is hosted on a secure (ssl, https) internet web server.
Because the web application is accessed via https, it cannot perform ajax calls directly to the device via http.
thought about two workarounds, but interested to see if i'm missing something:
Option 1 - Flash - Write flash component that will do the communication with the device over http. as flash is not restricted by the browser to secure communication only. The downside in this option is that whoever using the site will have to have flash installed.
Option 2 - new window - Open a new window using 'window.open' command, and passing it the html+script via parameter (similar to this SO). This window is consider non-secure and can communicate with the device over http. The downside in this option is that the user lose the context of the app, and that the new window could possibly be blocked by popup blockers.
Are there any other options i'm missing? (unfortunately opening a https server on the device is not possible)