get location url instead of html page in response code example Example: get actual url in variable var currentLocation = window.location;