Welcome Guest Search | Active Topics | Sign In | Register

Preload WebView with new Engine Options
Andreas
Posted: Wednesday, September 25, 2019 9:33:11 AM
Rank: Member
Groups: Member

Joined: 12/2/2015
Posts: 25
Hello,
in our Application we use at the moment for each tab a new Engine (to separate Sessions)
but now we want to improve the startup performance of each tab and we want to preload the next tab in background

I found this topic of preloading a webview (https://www.essentialobjects.com/forum/postst9873_EOWebBrowser-preloading.aspx)
but we cannot set a new engine to the webview

I also tried to set the webview to a new Window, found in this topic (https://www.essentialobjects.com/forum/postst9873_EOWebBrowser-preloading.aspx)
but this only works if i open the window

so my question is, is there another way to preload a webview with a new engine or do you know another way to do this
maybe a function like EO.WebBrowser.WebView.Preload("http://www.google.com", newEngine) would be fine.

or is there another way to open different tabs (maybe with the same engine) but with different session-scopes

thank you
eo_support
Posted: Wednesday, September 25, 2019 4:12:23 PM
Rank: Administration
Groups: Administration

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

There isn't a built-in way for you to preload a WebView with a specific Engine. What you can do is to use a ThreadRunner in the background to create a WebView to load the target page. Note that you can NOT use this preloaded WebView directly in your UI because it is attached to a background thread. This means you will still need to create another WebView for your UI. However pre-creating a separate WebView has the following benefit:

1. The engine would have been already created and initialized;
2. The corresponding resource (such as images and JavaScript) needed by the web page would have already been in the cache;

This should speed up things somewhat.

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.