Welcome Guest Search | Active Topics | Sign In | Register

How to submit a header during the site navigation? Options
iTester
Posted: Monday, June 19, 2017 10:41:45 PM
Rank: Member
Groups: Member

Joined: 5/2/2017
Posts: 25
Hello,
We need to submit the "Do Not Track" request when browser navigates to web site. In Microsoft WebBrowser it is possible to add "DNT:1" as header in .Navigate method.

Can you please let us know how we can submit the header while navigating to web site using EO browser?
Or we should submit the "Do Not Track" request ("DNT:1") usinig some other method?

Thanks!
eo_support
Posted: Tuesday, June 20, 2017 7:40:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Hi,

There are two ways to do it:

1. You can use LoadRequest instead of LoadUrl. When you use LoadRequest, you will pass a Request object, use the Request object's Headers collection to add your own headers;

2. Handle the WebView.BeforeRequestLoad event. The event arguments for that event has a Request property. You would then use e.Request.Headers to add your own headers;

The difference between option 1 and option 2 is option 1 only affects the first request. Option 2 affects every requests.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.