diff --git a/lib/io.js b/lib/io.js index febf03b3..3e9d9a45 100644 --- a/lib/io.js +++ b/lib/io.js @@ -20,4 +20,6 @@ this.io = { } }; -if ('jQuery' in this) jQuery.io = this.io; \ No newline at end of file +if ('jQuery' in this) jQuery.io = this.io; + +if (typeof window != 'undefined') this.io.setPath('/socket.io/'); \ No newline at end of file diff --git a/socket.io.js b/socket.io.js index 3762b0ff..c1c4cc70 100644 --- a/socket.io.js +++ b/socket.io.js @@ -22,6 +22,8 @@ this.io = { }; if ('jQuery' in this) jQuery.io = this.io; + +if (typeof window != 'undefined') this.io.setPath('/socket.io/'); /** * Socket.IO client *