I ran into a situation while developing a website where I needed to get a specific part of URL. Think of a URL, http://localhost/testjs/index.html. I want to extract both the base URL and the root URL which are,

Continue Reading ...