javacript getHTTPURL code example Example: javacript getHTTPURL var currentUrl = window.location.href;