Moodle JavaScript

Friends, I am new to moodle. I installed and configured Moodle. I’m trying to improve performance in JavaScript, but I’m struggling. Is there anything I can do for CloudFlare that might help? I’ve already tried using some tools here, but I’ve had issues with student sessions. I also had a problem with the login.

Hm, maybe Auto Minify (HTML, CSS and JavaScript) could help at least a bit here.
Nevertheless, how about Rocket Loader option? Have you tried enabling it?
Also, I would suggest the Brotli option to be enabled too.

What kind of? Like something was cached or maybe some error code?

Before moving to Cloudflare, was your Website working over HTTPS connection?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

1 Like

Yes. I configured all these features.

Trocas automáticas assinadas (SXGs)Beta (

be disabled.)

Thaks your very much.

Our main site is:
We’ve been staying here for a few years now. We created this subdomain 2 years ago. We believe all settings for the main domain to be working. We also believe that Page Rules should be used. It was there in the Page Rules that we set up and it started to give login and session errors. I don’t remember the exact rule used, but it was only for this subbominio This Rules Rule was a support guide.

Could you check if the SSL certificate is working and a valid (covering) this sub-domain?

Did you configured your Moodle app to work over or without www for this sub-domain?

Is it due to cookies or?

Was it on Flexible SSL?

Do you see any errors in the Developer Console (F12) of your Web browser for loading the JS resources or some other as well, if so?

Have you tried Purging the Cache at Cloudflare dashboard? (Purge Everything)


About 1 year late, I tried to set it up and it didn’t work. I said this at the beginning. That was the response from support after I tried and failed.

Hi, look at me back here.
The cache problem still remains.
Today, I realized that I was not able to log in to the subdomain I had configured it as it was in the tutorial but it still didn’t work.
How do I use it efficiently?

I have to temporarily disable it until this problem is resolved.

I had leased the ignore cache at* and also put cache everywhere at *

The login was wrong, or switched users giving, or had an error in the password.

I thought it was better to reopen the case than to make a new call because you were already following.
Can you help me please?

That’s the problem of cache everything setting, what you would need here is the bypass cache on cookie option but it’s only available on business plan.

There are two options or best practices described here:

The first one you will need to bypass cache from login areas:

However, as it’s URL based if by any change the logged user it’s directed to a URL that it isn’t cover by the rule you will get the cookies problems.

The second options we check for cookies and if they exist we don’t cache.

Hope this helps.
Best Regards,
Rui G. | Support Engineer

I ended up giving up and now after 1 year I’m trying to set it up. What can I do? Appreciate.

When I run Lighthouse, I get this:

Unfortunately, there’s nothing Cloudflare can do about unused JavaScript. Those are called by your site when they aren’t used. This does make me wonder if a Transform Rule can drop that request on pages where it’s not needed.

The webfont warning is only 20ms, which is literally less than the blink of an eye.


Thanks for the answers. I understood perfectly. I will study an alternative solution. The lighthouse data appears different to me. Appear with result much below. It may be a matter of location. I will close the topic and continue studying. Thanks.

1 Like