Can’t find socket.io.js [duplicate]

Your Socket.IO server will handle serving the correct version of the Socket.IO client library; you should not be using one from elsewhere on the Internet. From the top example on the Socket.IO website:

<script src="https://stackoverflow.com/socket.io/socket.io.js"></script>

This works because you wrap your HTTP server in Socket.IO (see the example at How To Use) and it intercepts requests for /socket.io/socket.io.js and sends the appropriate response automatically.

Leave a Comment