来自具有完整性的 CDN 的 CSS 加载两次

标签 css cdn

完整性和跨域使样式表在 Chrome 检查器中显示加载两次是否正常?

我正在使用这个:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

删除 integrity 和 crossorigin 属性时,它只会加载一次。 如果不是,为什么会发生?

最佳答案

我找到了一些关于这个问题的信息 here ,如果您还在寻找的话。

The integrity attribute for link elements has not yet been implemented and there’s an open spec issue about it. This means the presence of any integrity metadata will currently discard preloaded resources. In the wild, it can also result in duplicate requests where you have to make a trade-off between security and performance.

关于来自具有完整性的 CDN 的 CSS 加载两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42650050/

相关文章:

javascript - 如何使用 Dojo CDN + my.name.space.widget?

websocket - websocket cdn 如何处理双向数据?

Azure CDN 自定义域不起作用

vue.js - 在使用 CDN 中的 Vuejs 并运行 Codekit 时,如何将组件拆分为更小的文件?

C# ASPX 设置h1背景色运行时

css - div 顶部和后面的图像

旋转时CSS立方体摇摆不定

javascript - React.js ... ReactCSSTransitionGroup 有 CDN 吗?

html - 不允许元素破坏 bootstrap 3

html - 在全屏背景中居中对齐内容?