I'm new to embedded browsers, I admit, but I've got a GeckoFX v33 control working and hosted in a WPF application. Browsing and caching is working during a browsing session. However, upon application restart the cache is lost (or ignored) and all web assets are re-downloaded!
I'm quite dumbfounded why this isn't enabled by default, as it is a web browser control after all.
I've tried setting a custom profile path to an existing directory with write access:
var path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "xulrunner");
Gecko.Xpcom.ProfileDirectory = System.IO.Path.Combine( Directory.GetCurrentDirectory(), "webcache");
Gecko.Xpcom.Initialize(path);
I've also tried setting various combinations of preferences i.e.
Gecko.GeckoPreferences.User.SetBoolPref("browser.cache.disk.enable",true);
Gecko.GeckoPreferences.User.SetIntPref("Browser.cache.disk.capacity", 50000);
However, it ALWAYS loads the web assets again on app restart!
Does anyone know the correct configuration to get geckoFX or xulRunner to look at the last cache on startup?
Thanks in advance!