locked
Web Browser Control Problems RRS feed

  • Question

  • Dear Experts

    I use a Web Brower Control to display context specific webpages within a form. 

    Some pages that it needs to display take forever to load into the control - halting everything while it waits.

    By the law of sod, these problem pages load fine in every browser I've tried, except Internet Explorer (which sits behind the web browser control).

    a) Is there any practical way I can get the control to use, say Edge? OR

    b) is there an alternate control (powered by an alternative browser) I could use? OR 

    c) is there a way of halting the webpage loading if it takes too long?

    Many thanks

    Mark

    Saturday, October 26, 2019 7:33 AM

All replies

  • It could be caused by the fact, that the control defaults to act like IE 6(!)

    To change that behaviour, study the page here:

    Controlling WebBrowser Control Compatibility


    Gustav Brock

    Saturday, October 26, 2019 10:55 AM
  • It defaults to IE7.

    I agree with Gustav, what Emulation mode are you using currently?  Or have you not specified such and are running in IE7 mode?

    I will say that I find loading within the WebBrowser control to be slightly slower than opening the page in a standalone version of IE.

    This article may offer some help http://www.devhut.net/2019/10/18/everything-you-never-wanted-to-know-about-the-access-webbrowser-control/


    Daniel Pineault, 2010-2019 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Saturday, October 26, 2019 11:30 AM
  • You can get Edge using the WebView control as in Microsoft Edge WebView for Windows 10 apps - Microsoft Edge Development but I do not know if you can do that in VBA. That article describes how to use it in JavaScript.

    In most (all popular browsers I believe) you can use a developer tool to diagnose things like that. The details vary but one thing in common is that you can use F12 to get into the developer tool. Then from within that in IE click on the Network tab. Then reload the page (there might be a more direct way to get the network information but I do not know how). That will show each file loaded; you will be amazed by how much is loaded. In the right side it will show how long it took to load the item. That might tell you what the problem is or at least give a clue.



    Sam Hobbs
    SimpleSamples.Info

    Saturday, October 26, 2019 7:42 PM
  • Thank you Gustav.   I had previously changed the reg keys and it's using IE 11 according to whatsmybrowser.org

    The probblem pages are just as slow in standalone IE 11 (or any other version of IE) as the WebBrowser control


    • Edited by Pricey99 Sunday, October 27, 2019 9:40 AM
    Sunday, October 27, 2019 9:31 AM
  • Thank you Daniel - and thank you for your excellent blog post.

    It had been emulating IE 11, so I tried your '1234' tip in the blog.  Unfortunately, according to whatsmybrowser.org it is still using IE 11 (and not Edge).

    There isn't much speed difference between between opening a problem page in the WebBrowser control and standalone IE 11 - both take approx 20 seconds to load (but are immediate in all other standalone browsers).


    Sunday, October 27, 2019 9:47 AM
  • Thank you Sam 

    WebView would be ideal if it would work within MS Access.  From what I have read, I don't think it's possible.

    Maybe there is hope MS will port it over given IE is on it's way out.

    Thanks also for the tip re browser tool.

    Sunday, October 27, 2019 9:51 AM
  • Thank you Daniel - and thank you for your excellent blog post.

    It had been emulating IE 11, so I tried your '1234' tip in the blog.  Unfortunately, according to whatsmybrowser.org it is still using IE 11 (and not Edge).

    There isn't much speed difference between between opening a problem page in the WebBrowser control and standalone IE 11 - both take approx 20 seconds to load (but are immediate in all other standalone browsers).


    Then, I believe, you've run out of options for now. As the original Edge engine has ceased further development as it is about to be replaced with the new Edge Chromium, the only chance would be, that the webbrowser control would be updated to use the Chromium engine, and that will not happen in a near future, if ever.

    Gustav Brock

    Sunday, October 27, 2019 10:33 AM
  • What OS are you running?  Does it actually have Edge installed?

    Sometimes, clearing your webbrowser cache ... can help with performance.


    Daniel Pineault, 2010-2019 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Sunday, October 27, 2019 11:18 AM
  • Thank you! 
    Sunday, October 27, 2019 2:59 PM
  • Windows 10 - latest updates.  Edge is installed

    Cache cleared - makes no difference.

    Thanks for trying!

    Sunday, October 27, 2019 3:02 PM
  • Maybe there is hope MS will port it over given IE is on it's way out.

    IE is not on its way out. It is part of Windows. Also, removing IE would require that applications using the WebBrowser control (the COM object, not just the .Net class) be modified.



    Sam Hobbs
    SimpleSamples.Info

    Sunday, October 27, 2019 3:50 PM
  • That is most odd as it is my exact setup and 1234 works perfectly?!

    Any chance you have Browser Emulation Mode set in the HKLM as well?

    • HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
    • HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

    I did have someone post on my blog, that their corporate GP was stopping/overrriding this setting, could that be the case here?  If this is a corporate PC, could your IT dept be applying a policy that is impacting this setting?


    Daniel Pineault, 2010-2019 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Sunday, October 27, 2019 3:58 PM
  • You are absolutely correct - I had the HKLM keys set.

    Good news - having fixed that, the control is now reporting as Edge

    Bad news - it is still behaving as IE11 not Edge!

    Thank you for your help  (and Sam for the IE info)


    Monday, October 28, 2019 12:29 PM
  • I have exactly the same problem and the web pages that were slow were almost always google account alerts. This line of HTML is what was slowing down the IE WebBrowser control in MS Access.

    <link href="//fonts.googleapis.com/css?family=Google+Sans" rel="stylesheet" type="text/css"/>

    If you change "fonts.googleapis.com" to  "fonts.googleapis_I_am_very_slow_dang_it" so that the link is not valid, it solves the problem. If you delete this entire <link> tag, it also solves the problem. If you delete rel="stylesheet" it also solves it.

    Running the profiler in IE shows that it is hanging on "rendering HTML." I tried switching the font from Google_Sans to Tangerine but it still ran slow, and omitting type="text/css" does not fix it. I assume the bug in IE has to do with this external stylesheet from google.

    In my application, this is only a rare issue, and we're going to try it out with just removing this particular link and letting IE sort out what style to use. So far, the affected pages display fine without this CSS.

    Wednesday, September 16, 2020 2:26 PM
  • Good news ...if you can wait a few weeks ...!

    The Access team leader, Ebo Quanseh, has announced in a talk to the DAUG that a new browser control based on Edge Chromium will be released in mid-October for Access 365. This is an extra control. The existing IE web browser control will not be removed.


    For more info, see https://www.youtube.com/watch?v=x_o3F89EcBI. This item is around 14 minutes in.

    There's a lot more to come in the same video. Access is definitely not dead!




    • Edited by isladogs52 Friday, September 18, 2020 10:26 AM
    Friday, September 18, 2020 10:24 AM
  • That's great news - thanks for posting.
    Friday, September 18, 2020 11:00 AM