Skip to content

Instantly share code, notes, and snippets.

@AMHOL
Created January 25, 2013 10:53
Show Gist options
  • Save AMHOL/4633484 to your computer and use it in GitHub Desktop.
Save AMHOL/4633484 to your computer and use it in GitHub Desktop.
Javascript get host
window.location.protocol + '//' + window.location.hostname + (!!window.location.port ? ':' + window.location.port : '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment