• Resolved RobotFX

    (@wattaman)


    How to use PUSH? I’d like to add
    header("Link: </wp-content/cache/wpo-minify/1612257449/assets/wpo-minify-header-c06d0fff.min.css>; as=style; rel=preload", false);
    in the header.php, for example, but the plugin generates different .css/.js files. Any way? Or at least make the plugin generate a unique file for each .css and .js?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter RobotFX

    (@wattaman)

    So far I’ve added
    header("Link: <".$file_url.">; as=script; rel=preload", false);
    header("Link: <".$file_url.">; as=style; rel=preload", false);
    in the class-wp-optimize-minify-front-end.php, in 3 places so it should PUSH the .css and .js files created, but when testing using the Chrome’s Network tab there is no PUSH Initiator, instead it is always Other.

    • This reply was modified 5 years, 3 months ago by RobotFX.

    Hi there,

    I’m not sure to understand what you’re trying to do? Or at least what PUSH has to do with adding preload headers?

    Marc

    Hi there,

    So I looked into this, but the issue you’ll encounter with this is that the headers won’t be sent when page cache is enabled, as this part of minify isn’t called then.

    We’ll look into this feature, but the headers have to be saved to the cache somehow as well, or they won’t be sent.

    Marc

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

The topic ‘How to PUSH’ is closed to new replies.