如何停止 Google 表格“资源<网址>已使用链接预加载进行预加载,但在窗口加载事件后的几秒钟内未使用”警告

How to stop Google Sheets"The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event" warnings

提问人:object404 提问时间:8/23/2022 更新时间:8/23/2022 访问量:582

问:

我正在尝试将 Web 应用程序迁移到新的 Google 表格 GIS JavaScript API。它现在正在使用 OAuth 弹出窗口等,但我在等待几秒钟后出现这些警告消息并向浏览器控制台发送垃圾邮件:

docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_addons.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_app_finder_populator.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_addons.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_host_content_factory.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_app_finder_populator.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_app_finder_populator.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_host_content_factory.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_add_ons_promo_bubble_factory.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. docs.google.com/spreadsheets/d/xxx/edit#gid=xxx:1 The resource https://docs.google.com/static/spreadsheets2/client/js/xxx-waffle_js_prod_integrated_addons.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

这些在 Chrome 上,工作表/JS URL ID 替换为 xxx。Firefox 有一个类似但略有不同的警告消息,向控制台发送垃圾邮件。

我的 Google-fu 未能在警告中挖掘出与 Google 表格相关的任何内容。也许有人知道如何解决这个问题?

谢谢!

javascript oauth-2.0 google-oauth 警告 google-sheets-api

评论

0赞 Lorena Gomez 8/24/2022
我对这个错误做了一些研究,找不到太多,但我能找到的是警告引用了<link> HTML标签。您能否确认您在代码中使用此标记并共享该部分代码以确认是否是这种情况?
0赞 object404 8/24/2022
目前使用<link>标签指向Google字体,一些材料css。主要是字体和 CSS,但在迁移尝试之前,它们不会造成任何问题: developers.google.com/identity/gsi/web/guides/migration 将代码转移到新的登录过程后,上述垃圾邮件开始发生。

答: 暂无答案