I once found myself in a situation where the URI was changing by clicking on
a tag and
href was adding parameters like
name=dev community as a hash to make the page scrollable to a specific section. Basically, it was encoding the URI by adding a hash to it.
- decodes encoded URI
const encodedURI = "https://example.com?name=dev%20community"; const result = decodeURI(encodedURI); //https://example.com?name=dev community
encodeURI()which encodes the URI.