我希望为我的 Jquery 库使用预加载并使用以下代码。
<link rel="preload" href="https://code.jquery.com/jquery-3.4.0.slim.min.js" as="script" integrity="sha256-ZaXnYkHGqIhqTbJ6MB4l9Frs/r7U4jlx7ir8PJYBqbI="
crossorigin="anonymous">
<script
src="https://code.jquery.com/jquery-3.4.0.slim.min.js"
integrity="sha256-ZaXnYkHGqIhqTbJ6MB4l9Frs/r7U4jlx7ir8PJYBqbI="
crossorigin="anonymous"></script>
Run Code Online (Sandbox Code Playgroud)
但是,这始终会在 chrome 中生成以下警告。
找到了“ https://code.jquery.com/jquery-3.4.0.slim.min.js ”的预加载,但由于完整性不匹配而未使用。
资源https://code.jquery.com/jquery-3.4.0.slim.min.js是使用链接预加载预加载的,但在窗口加载事件的几秒钟内未使用。请确保它具有适当的as值并且是有意预加载的。
如果我使用标准实现,下面的代码将正常工作。
<link rel="preload" href="https://code.jquery.com/jquery-3.4.0.slim.min.js" as="script">
<script>
src="https://code.jquery.com/jquery-3.4.0.slim.min.js"
</script>
Run Code Online (Sandbox Code Playgroud)
所以我的问题是我可以预加载外部库并使用跨域和完整性(子资源完整性)吗?
谢谢
您好,我希望这是一个简单的问题,我正在通过 API 加载一些简单的数据,但是有些用户已经将其用户名设置为如下所示的精美字体。
Run Code Online (Sandbox Code Playgroud)
如何使用 PHP 将其转换为简单的标准编码,以便它显示为。
Web Reposts
Run Code Online (Sandbox Code Playgroud)
谢谢