remove( )


Removes query parameters from the current page's URL.

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

The remove() function 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 does not exist as a query parameter, it is ignored.

Calling the remove() function triggers the onChange() event handler if it has been registered.

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

Method Declaration
Copy
Method Parameters
toRemoveArray<string>Required

List of keys to remove.

Was this helpful?
Yes
No