Closed chenzhifeng0025 closed 3 weeks ago
I just uploaded a new version of the FMXTabbedBrowser demo with an option to create independent browsers. Notice that GlobalCEFApp.RootCache is a parent directory of all the cache directories. The Windows user running the application requires write privileges in GlobalCEFApp.RootCache.
The browser has to download all the page contents whenever a new independent browser is created because the cache is empty.
If you want to create several browsers sharing the same private cache directory then you must use TChromiumCore.ShareRequestContext to get a new ICefRequestContext and pass NewWebBrowser.ReqContextHandler as the second parameter.
There are several factors that affect the browser speed like an empty cache, proxy servers, firewalls, antivirus software, etc.
FMXTabbedBrowser uses a browser in "windowed mode" and it should work as fast as TabbedBrowser2 in VCL.
In the FMX version, when using an independent cache, the page content loads extremely slowly. This has been tested multiple times
I used the FMXTabbedBrowser demo project and modified the code in the
procedure TBrowserFrame.CreateBrowser
to give each page an independent cache directory. The code is as follows:With this code, opening a page makes the web page almost unusable, as it becomes extremely laggy. I've tested it multiple times, and the results are always the same. However, if I set
var TempCache := '';
, it works normally. This issue doesn't occur in the VCL version.