html - URL 包含原始换行符的资源请求已弃用

标签 html google-chrome console resources newline

有谁知道这个警告指的是什么以及我将如何解决它?

[Deprecation] Resource requests whose URLs contain raw newline characters are deprecated, and may be blocked in M60, around August 2017. Please remove newlines from places like element attribute values in order to continue loading those resources. See https://www.chromestatus.com/features/5735596811091968 for more details.

最佳答案

根据我在其他地方发现的情况,这是由元素属性中的换行符引起的。

必须删除或替换换行符,例如:

String.replace(/\n|\r/g, "");

关于html - URL 包含原始换行符的资源请求已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45983981/

相关文章:

html - 如何在html中的嵌入式 map 中使用鼠标滚动启用放大和缩小?

android - HTML5跨平台应用的架构类型

c++ - 需要更改 C++ 控制台文本大小

c# - Console.Error 和 Console.Out 不写入重定向文件流

javascript - 自动点击提交按钮 Javascript

html - 如何在考虑周围空间的情况下将弹性盒的最后一个元素向右对齐?

javascript - 无法显示和隐藏div

javascript - 在 y 轴上使用整数并在 x 轴上使用字符串的折线图

css - 为什么 CSS 背景在 Google Chrome 中间歇性地不可见?

php - 需要 Google Chrome 扩展程序中网站的文本