Title: CSS and JS minify
Last modified: September 1, 2016

---

# CSS and JS minify

 *  [rosen4o](https://wordpress.org/support/users/rosen4o/)
 * (@rosen4o)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/)
 * Is it possible to set version of minified css and js
    Sometimes when files are
   updated and regenerated they are not refreshed on the users computers so I want
   to force update by adding different version to the file.
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

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

 *  Thread Starter [rosen4o](https://wordpress.org/support/users/rosen4o/)
 * (@rosen4o)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572222)
 * There is hook for wp_default_styles but w3 total cache didn’t user version specified
   there
 * function my_wp_default_styles($styles)
    { //use release date for version $styles-
   >default_version = “20160714”; } add_action(“wp_default_styles”, “my_wp_default_styles”);
 *  [3Lancer](https://wordpress.org/support/users/3lancer/)
 * (@3lancer)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572262)
 * When you update the file(s), why don’t you just use the W3 cache Empty option?
 * Logged in under your WordPress Admin, on any webpage, at the top you have “Performance”
   with a dropdown list “Empty All Cache” or “Empty Modules > Empty Page Cache”.
 * Adding version control parameters to JavaScript and/or CSS tends to just slow
   you down.
 * If you do want version suffix, try the option under W3 cache called “Prevent 
   caching of objects after settings change” I believe? I haven’t tested it myself
   but this might be what you are after?
 *  Thread Starter [rosen4o](https://wordpress.org/support/users/rosen4o/)
 * (@rosen4o)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572286)
 * I’m using it but on some users continue to see old css
    There need to be preformed
   refresh to get the new css and then everything is ok
 *  [ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572328)
 * These users obviously had old versions of html and css/js in their browser cache,
   so actually a “Browser cache” problem instead of a “Minify” problem.
 *  Thread Starter [rosen4o](https://wordpress.org/support/users/rosen4o/)
 * (@rosen4o)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572332)
 * Yes this is correct but I want with w3 to be able to force download of the new
   css files
 *  [Scott Hartley](https://wordpress.org/support/users/destac/)
 * (@destac)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572393)
 * Did you make sure to clear the page cache after you enabled the query strings?
 *  Thread Starter [rosen4o](https://wordpress.org/support/users/rosen4o/)
 * (@rosen4o)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-7572414)
 * Yes of course
 *  [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-8863607)
 * I, too, would like to see purging all caches change the minified filenames to
   help denote it’s a new version of that file (which the new page cache will use
   instead moving forward). Why not have some way of having the minified files be
   able to say it’s a new version?
 * My ideal setup would be to have the default W3TC browser cache expiration for
   CSS & JS files as well as having the CSS & JS minified. Now, I just need the 
   ability to purge these caches to display updated JS/CSS code when needed. Otherwise,
   past visitors will potentially be using CSS/JS from weeks/months ago due to browser
   cache serving the old file since the minified filename didn’t change (even though
   the content did change).
 * Maybe the minified filenames periodically change as the page cache expires? I’m
   not sure, but currently I see using all of the features of W3TC in an optimal
   fashion leaves the minify feature with a bad bug.
 * Let me know if you hear anything about a workaround/fix/etc. or if it’s already
   accounted for within W3TC behind the scenes. Thanks!
 * I have also posted this at the similar topic at [https://wordpress.org/support/topic/minification-and-cdn-minified-file-name-doesnt-change-when-its-content-does/#post-8863621](https://wordpress.org/support/topic/minification-and-cdn-minified-file-name-doesnt-change-when-its-content-does/#post-8863621)
    -  This reply was modified 9 years, 3 months ago by [KZeni](https://wordpress.org/support/users/kzeni/).

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

The topic ‘CSS and JS minify’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [versioning](https://wordpress.org/support/topic-tag/versioning/)

 * 8 replies
 * 5 participants
 * Last reply from: [KZeni](https://wordpress.org/support/users/kzeni/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/css-and-js-minify/#post-8863607)
 * Status: not resolved