remove( )


Removes query parameters from the current page's URL.

Removes 1 or more query parameters to the current page's URL.

The remove() method can only be used when browser rendering happens, meaning you can only use it in frontend code after the page is ready.

If a specified key doesn't exist as a query parameter, it is ignored.

Calling the remove() method triggers onChange() if it has been registered.

Note: To retrieve the page's current query parameters, use the query method.

Method Declaration
Copy
Method Parameters
toRemoveArray<string>Required

List of keys to remove.

Did this help?