How to serve JS/CSS/Images from CDN in Moodle

Viewed 280

I was wondering how I can set up a CDN to serve static assets - JS/CSS/Image files of Moodle. Is there any plugin that can help? Or would I need to write it from scratch?

1 Answers

There are three ways to achieve it:

  1. setup a global CDN variable and prepend it
  2. define cdnURL variable at both the PHP level and JavaScript level
  3. I keep all JavaScript, CSS, JQuery, images in a separate folder and use/link it inside my custom plugins or core Moodle files.
Related