Title: Does cache update when CSS/JS changes?
Last modified: August 30, 2016

---

# Does cache update when CSS/JS changes?

 *  Resolved [yitwail](https://wordpress.org/support/users/yitwail/)
 * (@yitwail)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/)
 * I’ve looked at the documentation and FAQs but cannot find the answer, so I apologize
   if my question has already been answered. Do I have to manually empty Autoptimize
   cache when there’s a CSS or JavaScript change, or does Autoptimize detect the
   change somehow and update the cache automatically?
 * [https://wordpress.org/plugins/autoptimize/](https://wordpress.org/plugins/autoptimize/)

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

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/#post-6813476)
 * AO detects the change and will create a new autoptimized file in cache. The old
   autoptimized file remains in cache as well though, so emptying the cache now 
   and again would not hurt 😉
 * hope this clarifies,
    frank
 *  [Ramanan](https://wordpress.org/support/users/superpoincare/)
 * (@superpoincare)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/#post-6813531)
 * Of course Autoptimize will immediately detect changes to CSS/JS but if someone
   is also a cache plugin such as W3TC, that plugin will still refer to the old 
   filename till the HTML file expires or till the garbage collection runs (whichever
   is later) and that plugin’s cache has to be emptied.
 *  Thread Starter [yitwail](https://wordpress.org/support/users/yitwail/)
 * (@yitwail)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/#post-6813551)
 * Frank, thanks for the clarification and for creating a great plugin.
 * superpoincare, I don’t use W3TC — it’s too complicated, so I use Super Cache 
   instead, and it’s set to expire every hour so I’m not going to worry about it.
 *  [Ramanan](https://wordpress.org/support/users/superpoincare/)
 * (@superpoincare)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/#post-6813656)
 * Yitwail,
 * Understood your point. My point was to simply add and it’s true for any plugin
   which caches HTML.
 * Interestingly, I found this plugin: W3TC Auto Pilot. (although not relevant to
   your purpose but still nice).
 * [https://wordpress.org/plugins/w3tc-auto-pilot/](https://wordpress.org/plugins/w3tc-auto-pilot/)
 * It has: “Purge cache, whenever: … the theme is edited in Customizer.”

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

The topic ‘Does cache update when CSS/JS changes?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Ramanan](https://wordpress.org/support/users/superpoincare/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/does-cache-update-when-cssjs-changes/#post-6813656)
 * Status: resolved