W3 Total Cache
[resolved] Add postfix/Change name of minified files (6 posts)

  1. Skogberg
    Posted 2 years ago #


    I would like to change the name of the minified JS and CSS files W3 Total Cache puts out. For some reason my web host won't send files gziped unless they end with a postfix like for example: "/js/script.js?ver=1.0". Their support hasn't been able to do anything so far.

    In this tread it says it can't be done. That's true, at least in the admin settings for W3 Total Cache. But not if modifying the source code.

    Can someone show where this is done in the plugin source code so I can simply modify it and add "?whatever" to the files.



  2. Anthony Somerset
    Posted 2 years ago #

    enable the media query string in browser cache options? it adds a timestamp string to all media/css/js files or does it need to be a specific string?

  3. Skogberg
    Posted 2 years ago #

    It needs to end with "?something".

    I can't find the option you're mentioning. What does it specifically say?

    Where do I change the output in the source code? I think that would be easiest.

    I should have mentioned that mod_deflate and the other modules aren't detected in the compatibility test.

  4. Skogberg
    Posted 2 years ago #

    Found it. Added it. Solved it!

    Search for "</script>" and "<link" below and it's easy to find.
    w3-total-cache > lib > W3 > Plugin > Minify.php

  5. Skogberg
    Posted 2 years ago #

    Solved. Sorry forgot to add it on last post.

  6. Anthony Somerset
    Posted 2 years ago #

    the option is on the browser cache settings page and called Prevent caching of objects after settings change: http://f.sts.io/7bdMf4yHfJ.jpg

    that said it doesn't appear to be working on latest version of plugin with WP 3.6

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic