We are using declarativeNetRequest.getMatchedRules() to get the matched rules' URLs. When user switches website in the same tab, it returns URLs which were blocked in the previous website also, within past 5 minutes.
Is it possible to fetch getMatchedRules() only for current webpage in the same tab?
This is expected behavior. The getMatchedRules()
API can filter by tabId
and minTimeStamp
, but it doesn’t offer a direct way to filter by the current webpage in the same tab.
To work around this, you can use the minTimeStamp
parameter and pass the timestamp from the last result to exclude matches from the previous page.