diff --git a/Sources/BrowserServicesKit/ContentBlocking/UserScripts/contentblockerrules.js b/Sources/BrowserServicesKit/ContentBlocking/UserScripts/contentblockerrules.js index 7ca771a6e..515ddbd2c 100644 --- a/Sources/BrowserServicesKit/ContentBlocking/UserScripts/contentblockerrules.js +++ b/Sources/BrowserServicesKit/ContentBlocking/UserScripts/contentblockerrules.js @@ -139,7 +139,7 @@ // FROM: https://stackoverflow.com/a/7739035/73479 // FIX: Better capturing of top level URL so that trackers in embedded documents are not considered first party if (window.location !== window.parent.location) { - return new URL(window.location.href !== 'about:blank' ? document.referrer : window.parent.location.href) + return new URL(window.location.href !== 'about:blank' ? document.referrer : window.parent.origin) } else { return new URL(document.location.href) }