Detecting Navigation Redirect Chains

I'm building a macOS extension that needs to track multi-step navigation chains (A → B → C) to adjust behavior based on where users came from.

Current approach: Using webNavigation.onBeforeNavigate to detect intermediate steps, but experiencing issues in Safari that don't occur on Chrome/Firefox/Edge.

Questions:

  1. Is webNavigation the right API for tracking redirect chains in Safari?
  2. Does ITP/Private Browsing affect event delivery?
  3. Any alternative approaches recommended?

(Safari version 26.0.1)

Any guidance appreciated!

Answered by DTS Engineer in 868850022

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

It's possible the problems you're seeing could be related to Safari's privacy features or settings. Can you provide more information about the type of issues you are encountering?

Hi! Here are the specific issues I'm experiencing:

When navigating through a redirect chain (e.g., siteA.com → affiliate-network.com → destination.com), I need to detect the intermediate domain (affiliate-network.com) to adjust my extension's behavior.

On Chrome/Firefox/Edge: webNavigation.onBeforeNavigate fires for each step in the chain, allowing me to see all intermediate URLs. On Safari the events don't fire for intermediate redirects at all.

  1. Does Safari's webNavigation fire for HTTP 302/303 redirects?
  2. Does ITP strip or block these events for known tracking domains?
  3. Is there an alternative API for tracking redirect chains in Safari?

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

Detecting Navigation Redirect Chains
 
 
Q