Content Distribution Networks

In layman's terms a content distribution network (CDN) creates cached copies of website content on servers located around the globe. When a request is received from the site, the CDN fulfills the request from an area geographically close to the site visitor. This provides layers of security, lower bandwidth cost, greater uptime, and drastically reduced page load times.

MODX and CDNs

MaxCDN, Cloudflare, and others can be readily set up with any MODX installation and is typically straight-forward. In fact, several packages exist to automate some of this process, including Bootstrap for MODX and FontAwesome for MODX, which can serve as a passive connection to Bootstrap, JavaScript, and other hosted content. CDNs can also be actively connected to as part of an optimization process based from a user account with the provider.

The Manager and CDNs

The MODX manager is in a constant state of change either due to site administers monitoring or otherwise working on the site. The majority of these functions are quite safe and effective when using a Content Distribution Network, but occasionally things can get a little quirky such as unpopulated display areas, missing components during resource creation/editing, etc.

Recently, we began to notice that Tagger under the extras menu and on the resource page (on both the Tagger tab and on the Document tab) simply disappeared for no reason whatsoever. Upon investigation, it was discovered that the package was failing under the CDN cache. We subsequently logged in, and created the following page rule:

CDN Optimization Settings

Conclusion

The primary correction made, was to simply bypass caching altogether, while disabling Apps (such as Google Analytics), and the combining of all js and css into a single call (Rocket).

Take special note of the wildcard prefix so it will catch both www.shawnwilkerson.com, shawnwilkerson.com, and WhatEver.shawnwilkerson.com.

In this article