• Resolved archimedes.trajano

    (@archimedestrajano)


    How is HTTP/2 supported on this plugin? I don’t see the Link element on the headers. I am using this with AutoOptimize as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter archimedes.trajano

    (@archimedestrajano)

    Looking at the code I think the way to do this would be:

    1. when building the content the first time parse the content to the img and css links are extracted out to a list
    2. write out the list as the Link: header to a file associated with the content just add a different extension
    3. modifying readfile() to read the headers file if it exists then add extra headers using the headers()

    Cache Enabler is HTTP/2 focused. However, in to actually deliver assets via HTTP/2 it is still required that your origin server or CDN supports HTTP/2.

    Thread Starter archimedes.trajano

    (@archimedestrajano)

    Yup I actually did this by patching cache enabler to parse the content and spit out a file that looks like the Link: header

    Then I added the following to my .htaccess

    <If “-f ‘%{REQUEST_FILENAME}.headers'”>
    Header add Link expr=%{file:%{REQUEST_FILENAME}.headers}
    </If>

    Which will load up the contents of the .headers file that I generated when the cached version is created.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTTP/2 support’ is closed to new replies.