添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
睿智的柿子  ·  cef qt - Bigben ·  3 月前    · 
绅士的抽屉  ·  CEF Forum • ...·  1 月前    · 
近视的桔子  ·  MongoDB: How to ...·  2 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account
  switch url betweeen "about:blank" and "www.baidu.com" some times
 i find it cannot turn to "www.baidu.com" from "about:blank"

Notes: When the page is in the about:blank state, Load(url) twice , it will go wrong

Welcome! If you're reporting a bug, please make sure you have completed the bug report template see https://github.com/cefsharp/CefSharp/blob/master/ISSUE_TEMPLATE.md#bug-report. Please make sure you provide enough detail that someone else can reproduce the issue you are experiencing.
We prefer to keep this issue track just for bug reports. If you have a question or need help with something I'd ask that you self close this issue and have a read over https://github.com/cefsharp/CefSharp/blob/master/ISSUE_TEMPLATE.md it contains background information, details on where to ask your questions (hint, Gitter is one such place)
It's also reportant to remember that CefSharp is just a wrapper around the Chromium Embedded Framework(CEF), a lot of questions people have aren't actually CefSharp specific, they're generic to CEF and for those CEF has it's own support forum at http://magpcss.org/ceforum/index.php and issue tracker at https://bitbucket.org/chromiumembedded/cef

How do I investigate my issue further?

It's important to remember that CefSharp is just a wrapper around the Chromium Embedded Project (CEF), the upstream CEF forum is a valuable resource. Also CEF has it's own Issue Tracker. Please take the time to research your own problem, including Googling, searching on ceforum, etc.

Finding more info

  • Have you checked the Debug.log file? (Should be located in your apps executing folder by default)
  • Have you googled the error message your seeing? (Don't just google the whole thing, try googling just the keywords and possibly add chromium as a keyword).
  • Are you able to reproduce the problem using cefclient? (cefclient is the reference implementation provided by CEF)
  • Need more help debugging? Check the Troubleshooting Guide
  • Are you using the latest version? Check the Release Branches table to determine if the version your using is supported.
  • How do I download cefclient?

  • Firstly identity which version of CEF your actually using, easiest way is to check your packages.config file, look for the cef.redist.x86 package, it's version will be something like 3.2526.1362, that's the exact version of CEF you'll need to download for comparison. You can also open chrome://version in the browser to determine the version.
  • Open http://opensource.spotify.com/cefbuilds/index.html in a web browser
  • Locate the exact Branch you require, for the example above the branch is 2526, all the versions follow a similar pattern
  • Locate the Windows 32bit or Windows 64bit item, if you don't see the exact version, then click more revisions
  • Download Test App
  • Are you using WPF/Offscreen or WinForms?
  • This next part is key

  • To compare with WPF/OffScreen run cefclient --multi-threaded-message-loop --off-screen-rendering-enabled
  • To compare with WinForms cefclient --multi-threaded-message-loop
  • @amaitland hello amaitland, i am using WinForms.The verision i am using is "3.3239.1723"(63.0.3).
    it's simple in my code:
    private void btnGo_Click(object sender, EventArgs e)
    string url = textBox1.Text.Trim();
    browser.Load(url);
    //Thread.Sleep(30);
    browser.Load(url);
    change the url:
    1,"www.google.com" -> "about:blank"
    2, "about:blank" -> "www.google.com"
    it does not work at step 2, it also at the page of "about:blank", but if i use Thread.Sleep between Load(Url), it will work properly.

    there is no useful information in debug.log. it only write dome warning when the browser start like this:
    [0605/095707.569:WARNING:angle_platform_impl.cc(51)] rx::HLSLCompiler::compileToBinary(228):
    C:\fakepath(30,8-58): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
    C:\fakepath(35,8-28): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

    [0605/095708.579:WARNING:angle_platform_impl.cc(51)] rx::HLSLCompiler::compileToBinary(228):
    C:\fakepath(48,8-58): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
    C:\fakepath(53,8-28): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

    can you give me some suggestions about how to deal with it?

    about:blank is treated as a special case by Chromium, in newer version I don't believe it triggers a navigation.

    http://magpcss.org/ceforum/viewtopic.php?f=6&t=15989&p=38465&hilit=about%3Ablank#p38465
    http://magpcss.org/ceforum/viewtopic.php?f=10&t=15950&p=38246&hilit=about%3Ablank#p38246

    From a CefSharp point of view this is unlikely a bug. You should test with cefclient if you wish to confirm, see above for details.

    You can always use a data encoded uri, see https://github.com/cefsharp/CefSharp/wiki/General-Usage#loading-htmlcssjavascriptetc-from-diskdatabaseembedded-resourcestream for an example, it's at the bottom of that section

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

    //browser.Load("www.google.com");
    //browser.Load("www.google.com");
    browser.Load(testHtmlFilePath);
    browser.Load(testHtmlFilePath);

    At the second part, it does not work. If i load "www.google.com", it is ok.
    if i use data encoded uri at the first step, suach as :
    const string html = "<title>Test</title>";
    var base64EncodedHtml = Convert.ToBase64String(Encoding.UTF8.GetBytes(html));
    browser.Load("data:text/html;base64," + base64EncodedHtml);
    testhtml will not load completely, i need refresh the browser.