0

I'm encountering an issue when trying to connect to a socket from a mobile browser. When I open the same link on a PC, the socket connection is successful, but on the mobile browser, it disconnects before establishing a connection. I've attempted to address this by adding CORS (Cross-Origin Resource Sharing) headers when creating the socket server in Node.js, but the problem persists.

I'd like to understand whether there are specific considerations or configurations required for socket connections in mobile browsers. If it's not possible to establish socket connections in this manner, I'm considering creating an API to trigger socket events instead.

What steps or configurations might be needed to enable socket connections from mobile browsers, or is there a preferred alternative approach for achieving this functionality?

My web application is in angular and socket.io is implemented in node.js

0

Browse other questions tagged or ask your own question.