【发布时间】:2018-04-03 00:35:49
【问题描述】:
切换到免费的 SSL WebHosting (000webhost),现在 Google 字体无法渲染,搜索并尝试了很多东西,重绘文本的 CSS 代码不起作用,JS 也不起作用,我尝试将字体 URL 与https:没有协议(//),什么都不会发生。
<link href="https://fonts.googleapis.com/css?family=News+Cycle&subset=latin,latin-ext" rel="stylesheet" type="text/css">
它只发生在 Chrome 中,在 Opera 和 Firefox 中呈现正常。
奇怪的事实:当我用 F12 打开控制台并按 CTRL + F5 时,谷歌字体呈现正常,但只有当我打开控制台并重新加载时,当我正常进入站点时它不会呈现。太疯狂了。
这是控制台向我抛出的内容:
The FetchEvent for "https://fonts.gstatic.com/s/newscycle/v14/9Xe8dq6pQDsPyVH2D3tMQvk_vArhqVIZ0nv9q090hN8.woff2" resulted in a network error response: an "opaque" response was used for a request whose type is not no-cors
The FetchEvent for "same link" resulted in a network error response: an "opaque" response was used for a request whose type is not no-cors
The FetchEvent for "https://fonts.googleapis.com/css?family=News+Cycle&subset=latin,latin-ext" resulted in a network error response: an "opaque" response was used for a request whose type is not no-cors
The FetchEvent for "same link" resulted in a network error response: an "opaque" response was used for a request whose type is not no-cors
2undefined
Failed to load resource: the server responded with a status of 404 ()
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
【问题讨论】:
标签: google-chrome fonts google-chrome-devtools google-font-api google-fonts