Support » Plugin: Autoptimize » HTTP2 Server push

  • Resolved Grzegorz.Janoszka

    (@grzegorzjanoszka)


    I am sooo happy with your plugin you have no idea 🙂 I love it. It just does the job.

    My website works on ssl and http2 and I tried to implement HTTP/2 Server Push by installing a plugin with the same name. That plugin does the job – it does output into HTTP headers lines like:

    Link: </wp-content/themes/twentyfourteen/style.css>; rel=preload; as=style

    The only issue is it doesn’t understand what Autoptimize does and it outputs all the original styles and scripts, while later on in HTML source I had other styles/scripts – from Autoptimize.

    I thought of tinkering with that – maybe it is just a priority/order of actions or filters? But later on I thought: why do I need a separate plugin for HTTP/2 Server push if this great plugin (Autoptimize) could do that for me?

    I think it should be relatively simple to add a line to headers with the scripts, like:

    Link: </wp-content/cache/autoptimize/css/autoptimize_855e2f5104ae96a6bd1ce04f7385ba49.css>; rel=preload; as=style

    What do you think about it? In my opinion it would just add more awesomeness to this plugin 🙂

    Thanks for your support and considering this idea.

    If for some reasons you don’t want to implement server push, would you make it easier for me? Is there any way for my plugin to get a URL list of all autoptimized scripts and styles?

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Frank Goossens

    (@futtta)

    the reason is that the HTTP/2 push plugin probably works by reading the wordpress CSS & JS queue, which is irrelevant when using AO.

    adding HTTP/2 push headers is on the roadmap for a next AO-version (albeit probably behind a filter that defaults to false). but if you look here, you mind find some info on what might (not) come to AO and ideas of how to do it immediately with but a couple of lines of code 😉

    have a nice weekend,
    frank

    Amazing! I will go through that thread but I think I will accomplish my goal.
    Anyway I am really looking forward to see that functionality in Autoptimize (if that’s so easy). Thank you again!

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