Skip to content

Instantly share code, notes, and snippets.

@aramk
Created August 25, 2012 11:31
Show Gist options
  • Save aramk/3464169 to your computer and use it in GitHub Desktop.
Save aramk/3464169 to your computer and use it in GitHub Desktop.
Current URL in JavaScript
var loc = window.location;
var currentURL = loc.protocol + '//' + loc.host + loc.pathname;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment