-
Improvement
-
Resolution: Won't Do
-
Medium
-
None
Hi,
I would like to improve loading speed of my moodle site and would like to add the option to load static content like images, js-files, css-files etc from a CDN like KeyCDN.
See eg. https://www.keycdn.com/support/cdn-integration
My general idea would be to include a new config setting like the following:
$CFG->wwwcdnroot = 'https://cdn.mysite.com';
This new subdomain can then be linked via a DNS entry to the CDN provider or it could contain directly the corresponding cdn url like https://example-hexid.kxcdn.com
One possible option I saw in the code was in lib\weblib.php in the constructor of moodle_url to add a check like
$pos = strpos($url, '.js');
if ($pos !== false)
What do you think?
Currently I am using moodle 4.0.x, I can not go to a newer version as my hosting provider does not want/can not give me a newer MariaDB version which is required for updating moodle.
Greetings