Title: Adding stylesheet with a generated name
Last modified: August 24, 2016

---

# Adding stylesheet with a generated name

 *  [Uxus](https://wordpress.org/support/users/uxus/)
 * (@uxus)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-stylesheet-with-a-generated-name/)
 * I am using Sage theme and it minifies CSS during the build time, however it doesn’t
   remove comments and line breaks. I want to add the generated file to w3total 
   cache but the problem is – the generated css file will change it’s name after
   next build so I’ll have to add it again. It would be great if you add a feature
   to the plugin that will allow to add a file to cache by file name’s substring
   or RegExp. Thanks!
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

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

 *  Thread Starter [Uxus](https://wordpress.org/support/users/uxus/)
 * (@uxus)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-stylesheet-with-a-generated-name/#post-5958252)
 * I mean if the file is named likie this: main-e9070376.css and I could refer to
   it by `main` substring for example. The second part then will be ignored as it
   changes after each build.
 *  [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * (@carletto0282)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-stylesheet-with-a-generated-name/#post-5958424)
 * Hi there,
 * I’ve got same issue.
    I’m using Pagelines DMS child theme that works like already
   said by [@uxus](https://wordpress.org/support/users/uxus/)
 * I’d like to add a further request development: the CDN purge is also unable to
   load newly generated css files… so that everytime the css is generated I need
   to manually purge the old one from the CDN server.
 * Thanks
    Carlo

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

The topic ‘Adding stylesheet with a generated name’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/adding-stylesheet-with-a-generated-name/#post-5958424)
 * Status: not resolved