简体   繁体   English

C#中的WebBrowser控件上的特定网站加载缓慢

[英]Particular website loading slow on WebBrowser control in C#

When I load the following page in IE9 on Windows 7 then it loads fine. 当我在Windows 7的IE9中加载以下页面时,它会很好地加载。 But when I load the same page in WebBrowser control in C#, it takes 10+ seconds to load. 但是,当我在C#中的WebBrowser控件中加载同一页面时,加载需要10秒钟以上的时间。 Why is that? 这是为什么?

http://www.edu.gov.on.ca/eng/sift/index.asp http://www.edu.gov.on.ca/eng/sift/index.asp

I am simply using webbrowser.Navigate with this URL as parameter. 我只是使用webbrowser.Navigate并将此URL作为参数。

EDIT 编辑

Ok after little investigation I found out that it could be due to page size. 确定,经过很少的调查,我发现这可能是由于页面大小所致。 The combined page size with images and scripts (when I save it in IE9 as "File --> Save As") becomes 596KB. 带有图像和脚本的合并页面大小(当我在IE9中将其保存为“文件->另存为”时)为596KB。 But if WebBrowser itself is actually IE9 then why loading in IE9 is faster but in WebBrowser control is slower? 但是,如果WebBrowser本身实际上是IE9,那么为什么IE9中的加载速度更快,而WebBrowser中的控件速度却较慢?

It's taking about 12 secs on Chrome, IE, Firefox, Safari and Opera here. 在这里的Chrome,IE,Firefox,Safari和Opera上大约需要12秒钟。 Tested right now. 现在已测试。

Are you 100% sure that there is no caching on the way? 您是否100%确定途中没有缓存?
Propably your IE is caching pages (Temporary Internet Files) and the C# WebBrowser is not using that cache, though I've never used this control to say it for sure... 可能是您的IE正在缓存页面(Internet临时文件),而C#WebBrowser并未使用该缓存,尽管我从未使用过此控件来肯定地说它。

All tests here were made with a clean cache, so it will always fetch the whole page from the server. 这里的所有测试都是使用干净的缓存进行的,因此它将始终从服务器获取整个页面。

I'm testing this from Brazil using two ISP links (10Mbps 10% guarantee coaxial + 1Mbps 50% guarantee fiber). 我正在使用两个ISP链接从巴西进行测试(10Mbps 10%保证同轴+ 1Mbps 50%保证光纤)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM