sorry for my poor english in advance.
i want to force webbrowser control to not load images for reducing traffic and loading document faster.
unfortunately using csWeb, gecko, webkit and... is out of question for me.
i already used httpwebrequest and httpwebresponse with setting explorer cookies in my project but in some cases i need browser to send rendered data.somehow the target site did some trick with java so the data need to be navigate by browser.
i'm not good with c or c#, i found some solutions but i couldn't understand
Hidden Images of Webbrowser component to reduce memory usage
and
i would be very thankful if someone can help me.
my way is
RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true);
RegKey.SetValue("Display Inline Images", "no");
for Gecko(baceuse gecko is good for most purposes):
Gecko.Xpcom.Initialize("xulrunner");
GeckoPreferences.User["security.warn_viewing_mixed"] = false;
GeckoPreferences.User["plugin.state.flash"] = 0;
GeckoPreferences.User["browser.cache.disk.enable"] = false;
GeckoPreferences.User["browser.cache.memory.enable"] = false;
GeckoPreferences.User["permissions.default.image"] = 2;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.