-
Notifications
You must be signed in to change notification settings - Fork 17
Static CDN Filters (General Instructions)
In Quick Cache, this feature allows you to serve some and/or ALL static files on your site from a CDN of your choosing. This is made possible through content/URL filters exposed by WordPress and implemented by Quick Cache. All it requires is that you setup a CDN host name sourced by your WordPress installation domain. You give your CDN host name to Quick Cache and it'll do the rest! Super easy, and it doesn't require any DNS changes either :-) In fact, we think you'll find this is one of the simplest/easiest ways to take advantage of the most popular CDNs.
What's a CDN? It's a Content Delivery Network (i.e. a network of optimized servers) designed to cache static resources served from your site (e.g. JS/CSS/images and other static files) onto it's own servers, which are located strategically in various geographic areas around the world. Integrating a CDN for static files can dramatically improve the speed and performance of your site, lower the burden on your own server, and reduce latency associated with visitors attempting to access your site from geographic areas of the world that might be very far away from the primary location of your own web servers.
Nearly all of the most popular CDNs are supported. We recommend MaxCDN and/or Amazon CloudFront. However, you'll be happy to know that any CDN that can be sourced by a domain name; and which offers you a host name to deliver files through its network, will work just fine with Quick Cache.
CDNs that require DNS changes (such as CloudFlare) are a bit different. These are generally more difficult to integrate w/ Quick Cache, since Quick Cache expects you to provide it with a host name (i.e. a host name provided by your CDN). CDNs such as CloudFlare expect you to change your DNS records in order to route traffic through their network first. It's not impossible to get this working w/ Quick Cache, but we find it's much easier to integrate Static CDN Filters with companies like MaxCDN or CloudFront. Very reasonable, very simple to setup.
You signup w/ a CDN of your choosing and create what's known as a Distribution (aka: Zone, or Pull Zone; depending on the CDN that you choose). You specify the source of this distribution as your domain name; i.e. the domain name that your installation of WordPress is running from.
Upon creation, your CDN provides you with a host name for this Distribution (e.g. d1v41qxxxie0l.cloudfront.net
). Finally, you give that CDN host name (provided by your CDN) to Quick Cache. Save your Quick Cache options and that's it! :-)
Note: if your CDN provides you with an option to enable "Query String Forwarding" or "Interpretation of Query Strings", please do enable this. Enabling this feature allows Quick Cache to handle cache invalidations for you automatically.
All static files on your site; everything. Of course, you have a lot of control over this too. Quick Cache exposes several configuration options that allow you to whitelist/blacklist certain file extensions and/or certain URIs.
It's flexible enough that it can work with pretty much any combination of themes/plugins you like. In some cases you may need to add blacklist exclusions for certain plugins, but that should be a rare occurrence.