Recommended for maximum performance boost!

Mark all files served from the CDN to expire in the far future (decades from now). This is the same as telling browsers to always use the cached files. This can significantly speed up page loads. Files are also automatically compressed (when the browser supports it), to speed up page loads even further.
Finally, CORS (Cross-Origin Resource Sharing) is also enabled automatically for all these files, to prevent issues with fonts and JavaScript files being served from domains other than the origin domain.

Of course, you still want visitors to immediately get new versions of files when they change. That is why unique filenames are generated automatically.

## CSS aggregation

It is necessary to enable CSS aggregation, if you don't enable CSS aggregation, files referenced by the CSS (such as images and fonts) files that are served from the CDN will not load. To prevent access to unauthorized files, every "Far Future URL" is signed with a security token.

Without CSS aggregation, the URLs in the CSS files continue to be relative, and consquently, these files will be loaded using the same security token. But since the token is based on the filename, this will result in a HTTP 403 response.

With CSS aggregation, the URLs in the CSS files will be rewritten. However, Drupal core's CSS aggregation is not very smart either, and it will in fact cause more or less the same problem. That's why the CDN module comes with an override of Drupal core's CSS aggregation, which correctly alters every file URL. As a result, this also enables us to e.g. serve the CSS file from one CDN, the images referenced by it from another and the fonts referenced by it from yet another.

## CDN or reverse proxy required

The Far Future expiration setting causes files to be served through PHP for with the optimal headers, and some files are compressed automatically. This causes a lot of overhead.

This implies that you must use a CDN or a reverse proxy such as Varnish (a CDN is actually just a very advanced and expensive reverse proxy). If you don't, very long load times will be the result — your site will actually become slower!

In fact, if you use the simple "subdomains point to main domain" trick to parallelize page loads, you'll even find that Far Future expiration will not work at all when you're using a separate web server just for static files (typically nginx or lighttpd). This is because they won't be able to find the files due to the Far Future URLs being signed with a security token.
It will work when you're using the same web server for these alternative domains as you're using for serving the actual Drupal site. But in that case, very long load times will be the result.

Conclusion: only use Far Future expiration when using a CDN or a reverse proxy.

## Detailed information for the experts

The following HTTP headers are set: `Expires`, `Cache-Control`, `Last-Modified`, `Vary` and `Access-Control-Allow-Origin` for files with one of the following extensions: `css`, `js`, `svg`, `ico`, `gif`, `jpg`, `jpeg`, `png`, `otf`, `ttf`, `eot`, `woff`, `flv`, `swf` and of these extensions, some will also be automatically compressed: `css`, `js`, `ico`, `svg`, `eot`, `otf`, `ttf`.