Rocket loader enabled only for non-logged in users in WP

I found out that rocket loader speeds site up for non logged in users but slows it for logged in users.

Is there a way to disable RL for logged in users?

I can’t think of any way on any plan that would disable Rocket Loader based upon a cookie.

1 Like

I was thinking of a script, adding <script data-cfasync=“false” src="/javascript.js"> too all scripts when user is logged in. But since I am not much of programmer, I have no idea if it is viable and possible solution.

:wave: @marek.jakubcik1,

What metrics/tests are leading you to conclude rocketloader is slower for logged in users? Do you have an example url and or account to test the performance? What does slower translate to in real world timing?

— OG

Refreshing chrome while on front page logged in as admin.
with RL ± 2.4s
without it ± 2s

WordPress users have the option to enable the admin bar on top of the page on the front end. If the slowness you are seeing is appearing on the backend, or on pages with the admin bar on top, you may want to create a page rule that disables Rocket Loader from the /wp-admin/ path, and see if that helps.


Hi @cbrandt, what would the page rule look like in Cloudflare to disable Rocket Loader for anyone logged in to WordPress Admin? Thanks!

As @sdayman stated earlier in this thread, there doesn’t seem to be a way to disable Rocket Loader based on a cookie.

What I suggested above is that you disable RL for a URL pattern, so that it won’t apply to /wp-admin/ area:


Of course you can and should edit this rule to add other settings as needed. I for instance always disable apps in the wp-admin area, and turn security level to high.


Ah ha! Thanks for showing what that URL pattern would look like, @cbrandt. Makes sense and we’ll apply that to our page rules and see if it helps.

Thanks so much for the reply! We appreciate you!

  • Brian + Erin
1 Like

I just turned off rocket loader and let it be… I will not mess with it until I run into such issue again, if I ever will.

Isn’t RL disabled in wp-admin by default? I can’t find an update on this question.

Replies to the thread you’ve linked to, coming from a couple Cloudflare staff members, shows that no, RL is no longer disabled in /wp-admin/ by default.

You may want to open a ticket with support (click on the link // Cloudflare Support // at the top of this page, and pick option “Get more help”) so that they can test your specific issue and try to find a solution for it.


This topic was automatically closed after 30 days. New replies are no longer allowed.