Bug 303800

Summary: Disabling Safari content blockers also disables Safari web extension DeclarativeNetRequest
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: WebKit ExtensionsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: All   
OS: Unspecified   

Jeff Johnson
Reported 2025-12-08 18:46:38 PST
Disabling content blockers in Safari Settings or on the website in Safari also disables DeclarativeNetRequest redirects, even though DNR is from the Safari web extensions API rather than the Safari content blockers API. I can reproduce this bug in Safari 26.1 on macOS and iOS. I don't know when the bug was introduced. Steps to reproduce: 1) Download the sample Xcode project from https://bugs.webkit.org/show_bug.cgi?id=303118 (DNR rules are not applied to a private window if Safari opens with a non-private window and vice versa) 2) Unzip, build, run, and enable the attached Safari extension DNRProfilesBug 3) Open https://gs.statcounter.com/detect in Safari 4) Verify that the User-Agent is "My Custom User Agent" 5) Reload Without Content Blockers in the Safari View menu Expected results: User-Agent is My Custom User Agent Actual results: User-Agent is Safari Reload With Content Blockers changes the user agent back to My Custom User Agent.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-12-08 18:47:00 PST
Note You need to log in before you can comment on or make changes to this bug.