Skip to content

server: use JS location.hostname with livereload.js resource#116

Merged
lepture merged 1 commit intolepture:masterfrom
blueyed:livereload-snippet-via-js
Jun 29, 2015
Merged

server: use JS location.hostname with livereload.js resource#116
lepture merged 1 commit intolepture:masterfrom
blueyed:livereload-snippet-via-js

Conversation

@blueyed
Copy link
Copy Markdown
Contributor

@blueyed blueyed commented Jun 27, 2015

Uses JavaScript to dynamically inject the client's hostname.
This allows for serving on 0.0.0.0, where a rendered hostname of
"0.0.0.0" would not resolve necessarily to the server's address.

Uses JavaScript to dynamically inject the client's hostname.
This allows for serving on 0.0.0.0, where a rendered hostname of
"0.0.0.0" would not resolve necessarily to the server's address.
@RonnyPfannschmidt
Copy link
Copy Markdown
Contributor

i recall that modern livereload.js can extract those information on its own,
it might be worth a try to leave its discovery to itself

@blueyed
Copy link
Copy Markdown
Contributor Author

blueyed commented Jun 28, 2015

@RonnyPfannschmidt

i recall that modern livereload.js can extract those information on its own,

But it needs to be loaded first?!

If there's http://0.0.0.0:$port/livereload.js in the HTML on a remote client, how should it get retrieved from e.g. 192.168.X.X?

lepture added a commit that referenced this pull request Jun 29, 2015
server: use JS location.hostname with livereload.js resource
@lepture lepture merged commit b187d80 into lepture:master Jun 29, 2015
@blueyed blueyed deleted the livereload-snippet-via-js branch June 29, 2015 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants