Block CSS/JS from loading Hack Help

Hello guys,

Is there a way that I can instruct Cloudflare not to load certain CSS/JS files?

Let’s say the link for the resources is https:// mywebsite . com/wp-content/cache/abcdefgh.css

Is there a way I can instruct Cloudflare not to load that cached css resource?

You can create a Firewall Rule to block access to that file.

Let me try that and see

1 Like

Can you give me an idea of how to configure it and prevent Cloudflare from loading it?

For clarity, what do you mean by this? Cloudflare doesn’t really “load” anything, unless you mean Cache. Or do you not want visitors to be able to load the file?

Cloudflare pulls assets it has cached for loading on the website. What I want is to instruct Cloudflare not to pull/load certain CSS/JSS assets.

This is not related to visitors but backend operations.

You’d have to do that at your server.

Purge the Cache - add the full URL to the CSS and flush?

Firstly, as far as I can see you are using WordPress?
Can you deactivate the caching plugin that generates it first?
Did you reviwed what code does it hide or add in the “hacked” .css file?
Is that a nulled theme or plugin?

You can use Page rules as already stated, or bypass .css file(s).

1 Like

Yes it’s WordPress.

The challenge is, Cloudflare is pulling the same CSS file twice resulting to one unused CSS loading.

I have deactivated the cache plugins and the issue still happens.

It only disappears after I disconnect Cloudflare.

Hmm, the URLs are with WWW and/or NON-WWW?, or even in combination with HTTP and/or HTTPS?

Both are HTTPS non-WWW

I wonder if it’s an HTTP/2 Push. So it shouldn’t be pulling twice from the server. Heck, it should be cached by Cloudflare and rarely pulled from the server.

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