Search code examples
htmlcssfirefoxoptimizationpreload

Preload is not supported by Mozilla firefox


I have issue in preload, I tired to preload the css sheet using preload in html. Its supported by google chrome but its not supporting in 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>

Solution

  • apparently it landed in firefox 85 on january 26th of 2021 according to caniuse

    soon™ https://bugzilla.mozilla.org/show_bug.cgi?id=1222633

    https://caniuse.com/#search=preload

    as of right now, you can only enable preloading manually by enabling the network.preload flag in firefox.

    edit in September 2020:
    still in development: https://platform-status.mozilla.org/#link-rel-preload