可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I noticed this info log
began to appear in Google Chrome Dev (Version 55.0.2883.18 dev) and I can't imagine why.
Slow network is detected. Fallback font will be used while loading: http://font-path.extension`
It appears on all websites that use font-face
, even on local pages and Chrome extensions.
回答1:
This means the network is slow, and Chrome is replacing a web font (loaded with a @font-face
rule) with a local fallback.
By default, the text rendered with a web font is invisible until the font is downloaded (“flash of invisible text”). With this change, the user on a slow network could start reading right when the content is loaded instead of looking into the empty page for several seconds.
- Related Chrome issue: https://bugs.chromium.org/p/chromium/issues/detail?id=578029. (A change enabling this behavior for 3G connections landed in September; this should be the reason you got the message.)
- Related source code: https://chromium.googlesource.com/chromium/src/third_party/+/master/WebKit/Source/core/css/RemoteFontFaceSource.cpp#74
回答2:
I faced same issue for chrome build 61.0.3163.100
on MacOs Sierra with localhost
as server. Chrome started logging this message when I changed network speed configuration to 3G fast/ 3G slow and again back to Online.
Fix:
When I tried selecting Offline mode and again Online mode, the logging issue disappeared. (This fix may no work on some devices or versions)
Update on 30th Jan 2018
I updated google chrome to Version 64.0.3282.119 (Official Build) (64-bit)
, it seems this bug is fixed now.
回答3:
EDIT: This is not working with latest version of 63.0+
I was able to disable it using help from one of above comments, go to
chrome://flags/#enable-webfonts-intervention-v2
The trick is to also disable the "Trigger User Agent Intervention for WebFonts loading always" option just below that as well.
回答4:
In my case, it was AdBlock Plus extension for Google chrome. Turned it off and it worked perfectly.
回答5:
I hide this by set console setting
Console settings
-> User messages only
回答6:
Goto chrome://flags/#enable-webfonts-intervention-v2 and set it to disabled
It’s due to a bug in Chrome with their latest API for ‘network speed’. Hope it will be fixed in the next version
回答7:
I have network throttling disabled but started to get this error today on a 75mb/s business connection...
To fix it in my build of Chrome 60.0.3112.90 (Official Build) (64-bit) I opened the DevTools then navigated to the DevTools Settings then ticked 'Log XMLHttpRequests', unticked 'User messages only' and 'Hide network messages'
回答8:
if you can access to css of this extension, simply add font-display:block;
on font-face definition or send feedback to developer of this extension:)
@font-face {
font-family: ExampleFont;
src: url(/path/to/fonts/examplefont.woff) format('woff'),
url(/path/to/fonts/examplefont.eot) format('eot');
font-weight: 400;
font-style: normal;
font-display: block;
}
回答9:
The easiest way to disable this is uncheck the warnings in the chrome dev tools
Hope this helps.
回答10:
I just managed to make the filter regex work: /^((?!Fallback\sfont).)*$/
.
Add it to the filter field just above the console and it'll hide all messages containing Fallback font
.
You can make it more specific if you want.
回答11:
回答12:
I also had the same errors with fontawesome's fonts.
Then I downloaded the lastest fontawesome's fonts and replace to the old fonts.
And the errors are gone.
回答13:
- No, this doesn't mean network is slow.
- No, this is not only false warning.
I have this problem on angular web applications after replace link https://fonts.googleapis.com/icon?family=Material+Icons in index.html to integrated version (npm install .... material-icons...). This works, but sometimes web application show that warning.
When warning is shown icons are not rendered for approximately 1 second, so user see badly rendered icons.
I don't have solution yet.
回答14:
you can click 'console settings', and check then box 'Use messages only', after that those messages won't show again.
回答15:
Right mouse сlick on Chrome Dev. Then select filter. And select source of messages.
回答16:
Updating to the latest version of Chrome (63.0.3239.84) via Help -> About fixed it for me.
(actually, I did had to switch to Offline and back to Online in the Network tab of developers tools to make the last errors go away.)
回答17:
As soon as I disabled the DuckDuckGo Privacy Essentials plugin it disappeared. Bit annoying as the fonts I was serving was from localhost so shouldn't be anything to do with a slow network connection.