How to exclude all JS files in Cloudflare for Wordpress

What is the name of the domain?

example.com

What is the issue you’re encountering

Hello there, we want to exclude all JS files from caching ( in wordrpress ) in cache rules. How we can make this possible? I think is with a rule ( at the end of the cache rules as that’s mandatory ) with domain and file exclusion. Is this correct or i’m wrong? Thank you for your help and time.

I’m trying this rule, but i’m not even sure about parameters AND and OR and if this rule is right.

Thank you.

Your rule looks good. Is it not working?

Just keep in mind that not all Javascript files necessarily use the .js file extension. Check if yours do.

Also, Cache Rules are “last match”, so you need to put this rule AFTER your other Cache Rules.

1 Like

Hello @Laudian thank you for your response.

I didn’t test it yet because I wasn’t sure if the rule it’s okey with the parameters AND and OR so I didn’t try. I will test it and I will reply in here :slight_smile:

1 Like

Hello @Laudian

Seems the rule I created works for me. Thank you anyway for your comment and help :slight_smile:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.