-
-
Save illucent/3b01ef05984d3511bf4c to your computer and use it in GitHub Desktop.
Get complete domain name with protocol and port if available. #js #url From http://stackoverflow.com/questions/6941533/javascript-get-protocol-domain-and-port-from-url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var domain = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port : ''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment