Support » Plugin: Fast Velocity Minify » Ignored files stripped of version number

  • Resolved Fabian

    (@gravitas)


    Hi there,

    The plugin strips the version of included JS files (See $ver in code below) even though they’re on the ignore list.

    wp_register_script( $handle:string, $src:string, $deps:array, $ver:string|boolean|null, $in_footer:boolean )

    So the request is js.bundle.js
    And not (without the plugin): js.bundle.js?ver=xyz

    • This topic was modified 1 year, 6 months ago by Fabian.
    • This topic was modified 1 year, 6 months ago by Fabian.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    Hello,

    Indeed, that’s the intended behaviour.

    The ignore list exists only for compatibility when there is a merging conflict and it’s not meant to leave the scripts completely alone.
    Query strings should always be removed from static assets, as they do nothing to the script itself, other than to bypass cache.

    If you are not running PHP inside the .js file, this changes is good for you and part of the optimization of fvm.

    But I’ll consider adding an option not to remove the query string of ignored files.
    Will add it to my roadmap.

    Thanks for reporting,

    Raul

    Hi Raul,

    thanks for considering.
    In our case query strings are indeed intended behavior and part of our versioning / client cache busting strategy.

    Plugin Author Raul P.

    (@alignak)

    Removing query strings from static resources is a recommendation on pingdom.com tests, that’s why fvm uses file names instead of query strings.

    What I can suggest for now, if you have control over the file query, is to change its name if you need cache invalidation. Something like filename-v2.js for example.

    But I’ll look into this in the future.
    Thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ignored files stripped of version number’ is closed to new replies.