{"action":"closed","issue":{"url":"https://api.github.com/repos/balderdashy/sails.io.js/issues/47","labels_url":"https://api.github.com/repos/balderdashy/sails.io.js/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails.io.js/issues/47/comments","events_url":"https://api.github.com/repos/balderdashy/sails.io.js/issues/47/events","html_url":"https://github.com/balderdashy/sails.io.js/issues/47","id":60132749,"number":47,"title":"Loading script cross origin without proper url makes browser unresponsive","user":{"login":"0x80","id":1193520,"avatar_url":"https://avatars.githubusercontent.com/u/1193520?v=3","gravatar_id":"","url":"https://api.github.com/users/0x80","html_url":"https://github.com/0x80","followers_url":"https://api.github.com/users/0x80/followers","following_url":"https://api.github.com/users/0x80/following{/other_user}","gists_url":"https://api.github.com/users/0x80/gists{/gist_id}","starred_url":"https://api.github.com/users/0x80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x80/subscriptions","organizations_url":"https://api.github.com/users/0x80/orgs","repos_url":"https://api.github.com/users/0x80/repos","events_url":"https://api.github.com/users/0x80/events{/privacy}","received_events_url":"https://api.github.com/users/0x80/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T17:30:59Z","updated_at":"2015-09-23T18:24:49Z","closed_at":"2015-09-23T18:24:49Z","body":"Not really an important issue, but I was using sails.io.js to connect a client to a cross origin sails host, without setting the url property. I naively thought the script would somehow figure that out by itself. Anyway the browser ended up going mental and maxing out the cpu / becoming unresponsive. So I thought I should mention it. \r\n\r\nThe sails server was a newly generated app with all defaults. This was my client html served from a static http server:\r\n```html\r\n<html>\r\n  <head>\r\n    <title>Sample App</title>\r\n  </head>\r\n  <body>\r\n  <script src=\"http://localhost:1337/js/dependencies/sails.io.js\"></script>\r\n  </body>\r\n</html>\r\n```\r\n\r\nThe console window gives an endless stream of this:\r\n```\r\nsails.io.js:4 engine.io-client:polling-xhr xhr data null +0ms\r\nsails.io.js:4 engine.io-client:polling polling got data ok +1ms\r\nsails.io.js:4 engine.io-client:socket socket receive: type \"error\", data \"parser error\" +0ms\r\nsails.io.js:4 engine.io-client:polling polling +0ms\r\nsails.io.js:4 engine.io-client:polling-xhr xhr poll +1ms\r\nsails.io.js:4 engine.io-client:polling-xhr xhr open GET: http://localhost:3000/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_s…ls_io_sdk_language=javascript&EIO=3&transport=polling&t=1425244294384-8536 +0ms\r\nsails.io.js:4 engine.io-client:polling-xhr xhr data null +0ms\r\nsails.io.js:4 engine.io-client:polling polling got data ok +1ms\r\nsails.io.js:4 engine.io-client:socket socket receive: type \"error\", data \"parser error\" +1ms\r\nsails.io.js:4 engine.io-client:polling polling +0ms\r\nsails.io.js:4 engine.io-client:polling-xhr xhr poll +0ms\r\nsails.io.js:4 engine.io-client:polling-xhr xhr open GET: http://localhost:3000/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_s…ls_io_sdk_language=javascript&EIO=3&transport=polling&t=1425244294386-8537 +0ms\r\n```\r\n\r\nPossibly the cpu was maxed out by the amount of messages printed to the console. "}}