我在预加载中遇到问题,我厌倦了使用html中的预加载来预加载css表。它受谷歌浏览器支持,但不支持Firefox
<head>
<link href=assets/css/master.css rel=preload onload="this.rel='stylesheet'" as="style" type="text/css">
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"
as="style" onload="this.rel='stylesheet'" as="style" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.theme.default.min.css" rel=preload
onload="this.rel='stylesheet'" as="style" type="text/css">
<link rel=apple-touch-icon-precomposed href=images/favicon-apple-touch.png> <link rel=icon href=assets/img/logo.png
sizes=32x32>
<link href="https://fonts.googleapis.com/css?family=Bad+Script" rel=preload onload="this.rel='stylesheet'" as="style">
</head>
答案 0 :(得分:2)
soon™https://bugzilla.mozilla.org/show_bug.cgi?id=1222633
https://caniuse.com/#search=preload
截至目前,您可以通过启用firefox中的network.preload
标志来手动启用预加载。
答案 1 :(得分:2)