Javascript: How to get current URL without Query string?
Here is a quick code to get the current URL of a page with Javascript:- var current_url = location.href; Here is another way:- var current_url = document.URL; Suppose, you have query string in your URL and you only want to get the actual URL without the query string. Here is the code for this:- var … Read more