don't hardcode hostname, use location.hostname (works with localhost if frame.localhost is added to /etc/hosts)