Title: Exclude folder
Last modified: October 9, 2019

---

# Exclude folder

 *  Resolved [nowton](https://wordpress.org/support/users/nowton/)
 * (@nowton)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/)
 * We currently experience issues when using AO with Download Monitor. Caching should
   be excluded on ‘/download/’. We tried adding this to CSS exclusion, but this 
   does not work. How would we properly exclude this folder from caching? Thanks
   in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-folder-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/#post-12012358)
 * Middag nowton;
    First of all a clarification; AO does NOT do page caching, so
   if “download monitor” advises to exclude the folder from caching, you’ll probably
   need to do so in your page cache configuration if you have that (could be at 
   plugin, server/ host or 3rd party level).
 * If you need JS/ CSS optimization not to be active on `/download/` (due to layout
   or javascript issues), then you can use this code snippet;
 *     ```
       add_filter('autoptimize_filter_noptimize','nowton_noptimize',10,0);
       function nowton_noptimize() {
       	if (strpos($_SERVER['REQUEST_URI'],'download/')!==false) {
       		return true;
       	} else {
       		return false;
       	}
       }
       ```
   
 * Hope this helps!
 * Groeten uit België,
    frank
 *  Thread Starter [nowton](https://wordpress.org/support/users/nowton/)
 * (@nowton)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/#post-12012423)
 * Bedankt! Thanks, will investigate further and try the code snippet as well.
 *  Thread Starter [nowton](https://wordpress.org/support/users/nowton/)
 * (@nowton)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/#post-12014279)
 * Path issues prevented downloads from happening, so proved to be totally unrelated.
   Thanks again for a wonderful plugin!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/#post-12014283)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

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

The topic ‘Exclude folder’ 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/)

## Tags

 * [plugin conflict](https://wordpress.org/support/topic-tag/plugin-conflict/)

 * 4 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-folder-2/#post-12014283)
 * Status: resolved