• Resolved kirpich1

    (@kirpich1)


    Hello.

    How do I enable the preload of optimizing CSS files in the header?

    link rel="preload" href="/autoptimize_1234567890.css" as="style"

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    I would not do that, because (a) browser *know* the CSS has high priority anyway and (b) forcing browsers to preload (even if not needed) means the CSS will have priority over other resources which esp. on mobile *could* actually hurt performance.

    That being said; have a look at the example code snippets over at this old Github issue for starters of how to accomplish preloading 🙂

    Thread Starter kirpich1

    (@kirpich1)

    I have a project where it is used:

    - link preload style.css

    - link stelesheet style.css

    The site opens faster visually to the visitor, because style.css has size 65 kb and i have link preload href=”font.woff2″ as=”font”. The page does not twitch when loading, fonts are displayed immediately. The page is displayed immediately without a pause. If I don’t use link rel=preload, everything is bad

    Sorry for my english 🙂

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    preloading the font can make sense, yes 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.