Skip to content

Instantly share code, notes, and snippets.

@kimisme9386
Created October 23, 2016 03:42
Show Gist options
  • Save kimisme9386/ee401ef4138671d986404e1c0704395e to your computer and use it in GitHub Desktop.
Save kimisme9386/ee401ef4138671d986404e1c0704395e to your computer and use it in GitHub Desktop.
JS get url request
var urlRequest = "";
if (window.location.port) {
urlRequest = window.location.protocol + "//" + window.location.host + ":" + window.location.port + window.location.pathname;
} else {
urlRequest = window.location.protocol + "//" + window.location.host + window.location.pathname;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment