Welcome Guest Search | Active Topics | Sign In | Register

Read HTML content without rendering it in the WebBrowser Options
Khoa
Posted: Monday, October 27, 2014 4:41:13 PM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
Hi,

I want to read HTML source code of a given url without loading it, for fast performance, using EO.WebBrowser. This practice is very similar to WebClient.DownloadString(url). But I want it to be multiple requests that supports many user connections to this web service at the same time.

The WebView class has GetHtml() methods to get HTML source code after using WebView.LoadUrl(url). However, I want to use the method like WebView.GetHtml(url) to get only HTML source code without loading the whole web link. Therefore, it would be very fast to read HTML contents in the background of the web service without displaying it.

Thank you.
eo_support
Posted: Tuesday, October 28, 2014 1:29:03 PM
Rank: Administration
Groups: Administration

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

I believe WebClient.DownloadString would be a better option for your scenario. The core feature of EO.WebBrowser is to parse, run and render a web page. Loading the HTML from a remote server is just a relatively small component for this goal. Further more, GetHtml does not get the HTML as is transferred from the server. It gets the current HTML. For example, if your page contains the script that modified the HTML, then GetHtml will get the modified HTML instead of the original HTML.

Thanks!
Khoa
Posted: Tuesday, October 28, 2014 4:59:44 PM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
WebClient.DownloadString is really slow and cannot bypass a proxy network. I would like to use the small component of EO.WebBrowser to get HTML from the remote server, without rendering it. Do you have any work around for it.

Thanks.
eo_support
Posted: Tuesday, October 28, 2014 9:42:14 PM
Rank: Administration
Groups: Administration

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

You can't just use the loader alone. You can only load the page into a WebView and then use GetHtml to get the current HTML.

Thanks!
Khoa
Posted: Wednesday, October 29, 2014 11:39:15 AM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
Hi,

Will EO.WebBrowser have the plan to include this feature in the future. I think it would be nice to use the loader, not the render for web service purpose.

Thanks.
eo_support
Posted: Wednesday, October 29, 2014 11:44:02 AM
Rank: Administration
Groups: Administration

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

No. We do not have any plans to introduce such features in the future. EO.WebBrowser is meant to be used as a browser component, not as a independent resource loader. The loader is closely coupled with other components of the browser engine in many places. For example, an HTTP authentication request will trigger the browser engine to prompt user for password, a CSS loading complete event will trigger the layout engine to redo the layout, etc. As such it does not make technical sense for us to try to separate them.

Thanks
Khoa
Posted: Wednesday, October 29, 2014 12:19:16 PM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
Thank you. I will try to use another different way to load HTML source.
eo_support
Posted: Wednesday, October 29, 2014 3:16:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
You are very welcome. Please feel free to let us know if there is anything else.


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.