|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
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!
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
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!
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
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
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are very welcome. Please feel free to let us know if there is anything else.
|
|