Use the hostname of the page's location as default host.

...because 'localhost' doesn't work when browser and server are running
on different machines.