Picture of Sam Tsiu
experience sharing: serving your course from a CDN
by Sam Tsiu - Monday, 16 November 2015, 6:29 PM

I recently built a course and hosted on a non-LMS web server. It was so slow, taking about 10s to load the course home page. Analysing with the chrome developer tool, I found that it was the css, js, json and all those image file that make the loading so slow.

I was able to move the css and image files to a CDN, but had no luck with the js and json files. 

Then I asked Oliver Foster and he's such a great help: not only provided the solution, but also talked me through to apply it.

I'm writing these steps below in the hope to help someone else who has the same problem.

  • apply this fix from the adapt framework repo.
  • build your course.
  • upload your build course to the CDN (everything but the index.html. It doesn't matter if you upload the index.html file to the CDN, it won't be used anyway).
  • add the following line to a local copy of the index.html file.
    <base href="/*CDN URL HERE*/"> 
  • upload the edited index.html to your web server.

That's it. Now my course homepage loads in less than 2s.

Please vote your +1 for this cross domain feature to be merged to the framework's master branch.

Picture of Tom Taylor
Re: experience sharing: serving your course from a CDN
by Tom Taylor - Monday, 23 November 2015, 4:41 PM

Update: this has now been merged, and will be included in the v2.0.5 release.