Flotype/now — Issue #155: local file not loading dependencies
Author: brihogan
Created: 2011-11-23 16:37:55+00:00
State: open

This must be because I'm using a local HTML file that connects to a node server, but it wasn't loading the socket.io/socket.io.js file. Turns out it was looking for `file://localhost:port/socket.io/socket.io.js` while it should have been looking for `http://`. It appears to actually look for `//localhost:port/xxxxx` and Chrome just figures it must be `file:` since I'm using a local html file.

I changed line 593 under `now.js` to include the `http:` string, but am not sure if this is safe. It seems to work for now.

fileref.setAttribute('src', 'http:' + uri + dependencies[i]['path']);

Obviously this would break if someone were using https. Maybe there ought to be an overriding constant or something? I realize this would mean someone would have to run an initializing function or something, but this would only be for the rare case someone uses a local file (like myself) - or maybe has an http file that communicates over https?

Anyway, brilliant framework!