Friday, November 8, 2013

XMLHttpRequest cannot load http:///socket.io/1/?t=1383952162872. Cross origin requests are only supported for HTTP

Lately I've been learning socket.IO in preparation for a new project. You'll come across simple errors as with any new tool you learn. The first error I had to figure out with this technology was: 


XMLHttpRequest cannot load http:///socket.io/1/?t=1383952162872. Cross origin requests are only supported for HTTP

The solution is simple, but it's part of the learning process. It turned out that I was loading the page in a browser as E:\example.html instead of http://localhost:8081/example.html. Fortunately it only took me a few minutes to fix.

No comments: