I am just curious. I think it has something to do with that socket.io temporary file, but I don’t really get it…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Browsers generally don’t allow HTTP requests to be made to domains different than the one the page is on. So a client.html file that’s opened as a “file://…” URL in the browser can only talk to other “file://…” urls. (i.e static pages only). However socket.io requires a real webserver on the backend, so it has to be “http://…”
There are also other considerations, around how file:// urls are treated differently. (e.g. you can’t set cookies, XHR requests to file:// urls don’t have HTTP status codes, etc.)