backdrop-contrib / cdn

Changes file URLs so that CSS, JS, images, fonts, videos, etc are downloaded from a CDN.
GNU General Public License v2.0
0 stars 0 forks source link

CDN

This module provide easy Content Delivery Network integration for Backdrop CMS. It alters file URLs, so that files are downloaded from a CDN instead of your web server.

It provides two modes: "Origin Pull" and "File Conveyor".

In "Origin Pull" mode, only "Origin Pull" CDNs are supported (hence the name). These are CDNs that only require you to replace the domain name with another domain name. The CDN will then automatically fetch (pull) the files from your server (the origin).

In "File Conveyor" mode, this module integrates with the File Conveyor [1] daemon. This allows for much more advanced setups: files can be processed (e.g. optimize images like smush.it [2], minify CSS with YUI Compressor [3], minify JS with YUI compressor or Google Closure Compiler [4], and it's easy to add your own!), before they are synced and your CDN doesn't have to support Origin Pull, any push method is fine (supported transfer protocols: FTP, Amazon S3, Rackspace CloudFiles). File Conveyor is flexible enough to be used with any CDN, thus it enables you to avoid vendor lock-in.

If you're not sure which mode to use, use "Origin Pull". It's easier and more reliable. Every single common CDN today (2015) supports Origin Pull.

Note: It is essential that you understand the key properties of a CDN, most importantly the differences between an Origin Pull CDN and a Push CDN. A good (and compact!) reference is the "Key Properties of a CDN" article [5].

The CDN module aims to do only one thing and do it well: altering URLs to point to files on CDNs. However, in later versions, it does as much as possible to make CDN integration frictionless: • Any sort of CDN mapping • optimal Far Future expiration (http://drupal.org/node/974350)

But in some cases, simply altering the URL is not enough, that's where the AdvAgg module comes in:

If you've ever had any issues with CSS or JS files not behaving as
desired, check out AdvAgg. The "Advanced CSS/JS Aggregation" module solves
all issues that arise from having CSS/JS served from a CDN. Keeping track
of changes to CSS/JS files, smart aggregate names, 404 protection,
on-demand generation, works with private file system, Google CDN
integration, CSS/JS compression, GZIP compression, caching, and smart
bundling are some of the things AdvAgg does. It's also faster then core's
file aggregation.

[1] http://fileconveyor.org/ [2] http://smushit.com/ [3] http://developer.yahoo.com/yui/compressor/ [4] http://code.google.com/closure/compiler/ [5] http://wimleers.com/article/key-properties-of-a-cdn

Supported CDNs

Installation

Documentation

Additional documentation is located in the Wiki: https://github.com/backdrop-contrib/cdn/wiki/Documentation.

Issues

Bugs and Feature requests should be reported in the Issue Queue: https://github.com/backdrop-contrib/cdn/issues.

Current Maintainers

Credits

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.