Skip to content

How do I serve the client

eknkc edited this page Feb 24, 2012 · 6 revisions

The client is served automatically by the Node.JS server. In your <head> tag of your HTML, include:

<script src="http://<uri:port>/socket.io/socket.io.js"></script>

If your web app and socket.io are on the same server and port, you can simply include:

<script src="/socket.io/socket.io.js"></script>

Socket.io client can also include optional version numbers, in order to maximize caching performance. You can simply include the version number within javascript filename;

<script src="/socket.io/socket.io.v0.0.1.js"></script>

Clone this wiki locally