5 ms·
>Wrong, because your web application should be using https. For security reasons, the browser will _not_ allow connections from an https-page to a non-https (or
by AgentME 8y ago
>Wrong, because your web application should be using https. For security reasons, the browser will _not_ allow connections from an https-page to a non-https (or secured web sockets) server. Thus, your native app's exposed API must use https/wss too. And here is where the article's ordeal begins.
The article also says that the website could make requests to http://127.0.0.1:portnumber/ http://127.0.0.1:portnumber/ and browsers will allow that even from HTTPS websites.
- kilburn 8y agoIt works for http requests, but not for websockets (the article also mentions that). If you want decent bidirectional communication (no polling, i.e., the kind you'd want to get reads from an NFC reader) that's not a good option. Also, I'm willing to bet browsers will block that at some point too...
- ytjohn 8y agoBut not websockets though.