Waqas Naeem Bajwadevbajwa.hashnode.dev路Aug 30, 2022How to find pathname of any URL - JavascriptIn this article I will share the knowledge of converting a string into URL and manipulating the properties of Uniform Resource Locator (URL). Let's start 馃殌 Scenario 1 We need current pathname from URL of the current webpage to consume it in our appl...2 likes路84 readsJavaScript
Hari Krishna Anemharikrishna.hashnode.dev路Jan 18, 2022JavaScript: How to get the URL parts from a URLconst url = new URL('http://example.com:12345/blog/foo/bar?startIndex=1&pageSize=10'); const { protocol, hostname, port, pathname, search } = url; console.log('protocol =>', protocol); console.log('hostname =>', hostname); console.log('port =>', por...61 readsurl