【问题标题】:Chrome bug not rendering Google Fonts [NOT PROTOCOL ISSUE]Chrome 错误未呈现 Google 字体 [NOT PROTOCOL ISSUE]
【发布时间】: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


    【解决方案1】:

    是本地问题,输入: chrome://serviceworker-internals/

    并删除与我的站点相关并正常工作的服务人员,如果在生产模式下发生,这将是可怕的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-27
      • 1970-01-01
      • 2017-09-20
      • 1970-01-01
      • 2015-03-28
      • 2015-12-01
      • 2014-08-23
      • 1970-01-01
      相关资源
      最近更新 更多