Skip to content

Bug: Empty Referrer when opening link in new window #4722

Open
@gkerenyi

Description

What happened?

When a link is opened in the same window or automatically in a new window (i.e. target="_blank"), then the referrer will be available for the opened page, but if a link is opened in a new window manually (by using "Open in new window" from the context menu or Ctrl + clicking), then the referrer will be empty.

This behavior is not reproducible in Microsoft Edge, i.e. in that browser the referrer is available to the opened page when it is manually opened in a new tab/window.

The behavior is not reproducible with WebView2 if the link is opened with Shift+Click.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WPF

Operating System

Windows 10, Windows 11

OS Version

No response

Repro steps

Open a link in a new window manually in WebView2WpfBrowser
For minimal repro I'm using the WebView2WpfBrowser sample app with the following change:

  • MainWindow.xaml: remove Source="https://www.bing.com/" from the <wv2:WebView2> tag.

Steps:

  1. Modify, build and start the WebView2WpfBrowser sample app
  2. Visit https://duckduckgo.com/?q=what%27s+my+referrer
  3. Ctrl + click the result that links to whatsmyreferer.com (or right-click it and select "Open link in new window")
    Result: The reported referrer is blank

image

Open a link in a new window manually in Microsoft Edge

  1. Start Microsoft Edge
  2. Visit https://duckduckgo.com/?q=what%27s+my+referrer
  3. Ctrl + click the result that links to whatsmyreferer.com (or right-click it and select "Open link in new tab")
    Result: The reported referrer is duckduckgo.com

image

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

AB#53005507

Metadata

Assignees

Labels

bugSomething isn't workingtrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions