Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js delete all url params

var url = new URL('http://demourl.com/path?topic=main');

// set search property to blank
url.search = '';

var new_url = url.toString();

// output : http://demourl.com/path
console.log(new_url);
Source by usefulangle.com #
 
PREVIOUS NEXT
Tagged: #js #delete #url #params
ADD COMMENT
Topic
Name
8+7 =