Home > widget-integration > FilterUrlHelper > clearAllParamHistory

FilterUrlHelper.clearAllParamHistory() method

Clears all filter parameters from URL history.

Removes all parameters that start with FILTER_KEY_PREFIX ('pf_') or their shortened equivalents if URL shortening is enabled.

Signature:

clearAllParamHistory(options?: {
		preventPushHistory?: boolean;
		isShortenUrlParam?: boolean;
	}): void;

Parameters

Parameter

Type

Description

options

{ preventPushHistory?: boolean; isShortenUrlParam?: boolean; }

(Optional) Configuration options for URL handling

Returns:

void

Example 1

Clear all filters:

this.urlHelper.clearAllParamHistory();
// Removes all pf_* parameters from URL

Example 2

Clear filters without adding to history:

this.urlHelper.clearAllParamHistory({ preventPushHistory: true });