0

my problems
cefsharp sometimes overlooked js update and will still go to the cache. I observed that the site has not been updated for some time, modify js will have this problem.

my environment

win10+vs2015+winforms+cefsharp49

my Configure the code

        var settings = new CefSettings { Locale = "zh-CN" };
        if (!string.IsNullOrEmpty(HapContext.Configuration.ProxyAdress)
            && !string.IsNullOrEmpty(HapContext.Configuration.Port))
        {
            settings.CefCommandLineArgs.Add("proxy-server",
                HapContext.Configuration.ProxyAdress + ":" + HapContext.Configuration.Port);
        }
        //settings.CefCommandLineArgs.Add("enable-media-stream", "1");
        settings.RegisterScheme(new CefCustomScheme
        {
            SchemeName = "webbrowser",
            SchemeHandlerFactory = new SchemeHandlerFactory()
        });

        settings.UserAgent = UrlManage.UserAgent;

        settings.IgnoreCertificateErrors = true;


        settings.CachePath = AppDomain.CurrentDomain.BaseDirectory + @"cache\";

        Cef.Initialize(settings, true, false);

my attempt

1.In the browser and cefsharp enter the same URL, get a different js

enter image description here

2.search stackoverflow,I found the problem is similar to mineenter link description here

But there is no answer to this question.

3.Search github also did not find the relevant information

4.When I call Browser.load (Browser.Address), js loads again,Everything is normal again

Any help is much appreciated.

sorry for my english.

  • Does the problem reproduce with version 63? 49 is old and unsupported. – amaitland Feb 13 '18 at 08:27
  • I have not tried 63, but I tried the same problem 57. The key is that I can only use 49, because I need to be compatible with xp – JokerSTACKOVERFLOW Feb 13 '18 at 08:30
  • If you need xp compatibility you might need to look at an alternative to CefSharp. – amaitland Feb 13 '18 at 08:53
  • @amaitland For me,it’s not worth looking for another kind of cefsharp for some reason,but thank you for your advice – JokerSTACKOVERFLOW Feb 13 '18 at 09:16
  • The problem is likely with CEF scheme handling code for which you'd have to log an issue with CEF if the problem reproduces in the latest version. If you switch to using the http scheme you might have better luck. For such an old version your options are very limited. – amaitland Feb 13 '18 at 23:20

0 Answers0