Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser loading image Options
Daniel Gront
Posted: Sunday, February 17, 2019 9:41:06 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2019
Posts: 2
Hey,

Between the period when you LoadUrl and until it loads there is a few seconds period which I can see a white page.
Is there a way to show an image in this time period instead or even when the LoadComplete shows?

Thanks,
Daniel
eo_support
Posted: Monday, February 18, 2019 2:06:35 PM
Rank: Administration
Groups: Administration

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

There is no built in support for this. You will need to implement this with your own code. For example, if you use Windows Forms, you can put another control above our WebControl to display the image, then hide that image when you receive LoadComplete event. If you use WPF then it will be more complicated because you can not simply overlay another control above the WebControl. In that case you may consider display some UI feedback somewhere such as in the status bar. Alternatively, you can create a web page that loads the actual page with an iframe and then implement the whole logic with JavaScript inside your web page. Either way it has to be done with your code.

Thanks!
Daniel Gront
Posted: Tuesday, February 19, 2019 12:43:33 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2019
Posts: 2
Hey,

I am aware of the event "LoadComplete" but this event takes me approximately 4-5 seconds which in terms of the browser means "The document and all sub-resources have finished loading".
But in theory, you could already see the page before when you are in "interactive state" that means "The document has finished loading and the document has been parsed but sub-resources such as images, stylesheets, and frames are still loading."

Is there such a thing?

Also, we are loading only one page all the time, is it possible to cache it in advance or enable caching?
* Is there any additional information about Iframe?

Thank you for the help!
eo_support
Posted: Tuesday, February 19, 2019 8:25:18 AM
Rank: Administration
Groups: Administration

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

LoadComplete event is fired as long as the main document finished parsing. It is roughly equivalent to document.load event. However in order for the main document finishes parsing, the main document itself and all the dependency resources must be done loading. This is not the same as all sub resources. A typical example of dependency resource is JavaScript file. In the following HTML:

Code: HTML/ASPX
<script src="some_js_code_that_defines_some_function.js"></script>
<script>
some_function();
</script>


The parser will not proceed to the second script block (that calls "some_function()") until the JavaScript files referenced in the first script element has finished loading (which defines "some_function()"). On the other hand, if the script element was an img element, then the loader will start loading the image in the background but the parser will continue.

Cache is automatically enabled by default and is already highly optimized. So there is nothing particular needs to be done. It is however possible that your server/page explicitly disabled cache. Cache are also automatically disabled for certain types of request (such as HTTP POST request).

iframes are loaded asynchronously. So it should not block LoadComplete event.

Please keep in mind that all the above are well defined/established behavior of the browser engine. In another word, they are not rules made by us. They are just how modern browser engine works in general.

Hope this helps.

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.