JavaScript URL query string manipulation
Jun 7, 2021
Changing the URL in the browser with JavaScript has long been a difficult and error prone affair.
You’d try to use regular expressions, split
, index
, and slice
to get at the query string. Then you’d make your change, removal, or addition and then try to use join
to put it all back together.