Rank: Advanced Member Groups: Member
Joined: 8/29/2016 Posts: 64
|
Is it possible to prevent opening new Windows in new WebView and navigate in the same WebView but keep Referer?
To keep Referer I can't just catch the event NewWindow and Navigate in the same WebView as Referer will be cleared.
The second question. Is it possible navigate WebView with sending Referer header?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, You can do something like this:
Code: C#
EO.WebBrowser.WebView webView = (EO.WebBrowser.WebView)sender;
EO.WebBrowser.Request r = new EO.WebBrowser.Request(e.TargetUrl);
r.Headers["Referer"] = webView.Url;
webView.LoadRequest(r);
The key is to use EO.WebBrowser.Request object and WebView.LoadRequest method. This allows you to set referer yourself. Thanks!
|