twitter-bootstrap – bootstrap样式表被加载两次

前端之家收集整理的这篇文章主要介绍了twitter-bootstrap – bootstrap样式表被加载两次前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
</html>

在chrome网络中,我可以看到bootstrap.min.css被加载了两次.
谁能解释一下为什么? v.57胜利8.1

解决方法

找到有关问题 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.

原文链接:https://www.f2er.com/bootstrap/233735.html

猜你在找的Bootstrap相关文章