0
votes

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

WebBrowser Customization

i would be very thankful if someone can help me.

1
this forum appears to have a solution: vbforums.com/…5uperdan
thanks a lot man. that's exactly what i wanted.Saman

1 Answers

0
votes

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;