[英]force webbrowser control to not load images
sorry for my poor english in advance. 对不起我的英语不好。
i want to force webbrowser control to not load images for reducing traffic and loading document faster. 我想强制Web浏览器控件不加载图像以减少流量并更快地加载文档。
unfortunately using csWeb, gecko, webkit and... is out of question for me. 不幸的是,使用csWeb,gecko,webkit和...对我来说毫无疑问。
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. 我已经在项目中使用httpwebrequest和httpwebresponse来设置资源管理器cookie,但是在某些情况下,我需要使用浏览器来发送呈现的数据。以某种方式,目标站点使用java会产生一些欺骗,因此需要通过浏览器进行导航。
i'm not good with c or c#, i found some solutions but i couldn't understand 我对C或C#不好,我找到了一些解决方案,但我听不懂
Hidden Images of Webbrowser component to reduce memory usage Webbrowser组件的隐藏图像以减少内存使用
and 和
WebBrowser Customization Web浏览器定制
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;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.