[Resolved] HTTP Server Push

Home Forums Support [Resolved] HTTP Server Push

Home Forums Support HTTP Server Push

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #902048
    Simon

    Hey Tom,

    Totally understand if this question is beyond the scope of things. So happy for you to just delete this post.

    But any idea on how to implement server pushing on select CSS files? Cloudflare just says it as easy as adding this to the header, but no idea how to go about doing that and thought maybe you have done it before.

    Link: </css/style.css>; rel=preload; as=style;, </css/style2.css>; rel=preload; as=style;

    Cheers,
    Simon

    #902703
    Tom
    Lead Developer
    Lead Developer

    If you’re using Cloudflare, it looks like you can do this with their plugin: https://support.cloudflare.com/hc/en-us/articles/115002816808-How-do-I-enable-HTTP-2-Server-Push-in-WordPress

    Otherwise, it looks like wp_enqueue_style and wp_enqueue_script would need to be filtered to include those attributes.

    #902861
    Simon

    Thanks Tommo,

    I actually enabled that from the plugin, but it doubled up the files pushing them and serving them normally. Which seems a little pointless.

    I’ll see if i can find a dev to code up something to enqueue the attributes as you mentioned.

    Thanks again.

    Si

    #903151
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

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