I have just started with socket.io, its giving JS Error on client page
io is not defined
How to fix this ?
<script src="http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script>
this is the latest version of socket.io to be included.
Wrap your client code on a '$(document).ready()' for jQuery or another library similar function. This way you'll be sure your code runs after the library beeing loaded.
Alternatively you can use the Socket.io CDN:
<script src="https://cdn.socket.io/socket.io-1.0.0.js"></script>