|
|
Note: for further questions, consult the [Rackspace documentation](http://docs.rackspace.com/api/).
|
|
|
|
|
|
### Understanding 'activating CDN delivery'
|
|
|
|
|
|
Rackspace Cloud Files is primarily a file storage service and so CDN delivery of stored files has to be 'activated' either on the webinterface or via a tool like Cyberduck.
|
|
|
|
|
|
Since CDN delivery has been activated for the entire `mathjax` container, CDN delivery is automatically active for all files uploaded into the container. In other words, **there's no need to activate CDN delivery any further**.
|
|
|
|
|
|
### Compression
|
|
|
|
|
|
[Rackspace can compress at the CDN edge](http://www.rackspace.com/blog/cloud-files-cdn-compresses-at-the-edge/): while files are stored uncompressed on Cloud Files, the CDN will respond to `accept-encoding` headers from browsers by delivering compressed files from the CDN edge locations.
|
|
|
|
|
|
**Note**: this compression is restricted to html-, javascript- and css- files.
|
|
|
|
|
|
Additionally, we could compress files manually and set the content-encoding header, but this isn't used in the current setup due to IE problems with such a setup.
|
|
|
|
|
|
### http header settings at Rackspace
|
|
|
|
|
|
Rackspace sets most http headers correctly upon upload to Cloud Files. Several custom headers can be set (see [rackspace blog post](http://www.rackspace.com/blog/thanks-for-your-feedback-cloud-files-supports-12-new-headers/)).
|
|
|
|
|
|
Again, manipulating headers is best done via [Cyberduck](http://cyberduck.ch).
|
|
|
|
|
|
#### Changing metadata of the font files
|
|
|
|
|
|
Whenever you upload font files to Rackspace Cloud Files, you will have to modify the http-headers for these font files. Currently (i.e. `2.0-latest`) this means two things:
|
|
|
|
|
|
* Update the `content-type` header as follows:
|
|
|
* For `.eot` files: `application/vnd.ms-fontobject`
|
|
|
* For `.otf` files: `font/opentype`
|
|
|
* For `.woff` files: `font/x-woff`
|
|
|
* svg: `image/svg+xml` (should already be set correctly by Rackspace)
|
|
|
* Add a custom header to `eot`, `otf`, `woff` and `svg` font files:
|
|
|
* `Access-Control-Allow-Origin` with value `*`
|
|
|
|
|
|
Practical advice:
|
|
|
* Cyberduck makes it easy to set these headers, see [its documentation for Rackspace](http://trac.cyberduck.ch/wiki/help/en/howto/cloudfiles).
|
|
|
* descend to the respective folders (`eot` etc.)
|
|
|
* select all files at once
|
|
|
* click Info->metadata and modify/add the header for all selected files simultaneously.
|
|
|
|
|
|
### SSL access
|
|
|
|
|
|
[Rackspace offers https-access](http://www.rackspace.com/blog/rackspace-cloud-files-cdn-launches-ssl-delivery/) but just like Amazon CloudFront, no cnames.
|
|
|
|
|
|
Additionally, the encrypted address differs from the unencrypted one as in the following example:
|
|
|
|
|
|
```
|
|
|
https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
|
|
|
vs
|
|
|
http://c328740.r40.cf1.rackcdn.com/mathjax/latest/MathJax.js
|
|
|
```
|
|
|
|
|
|
|
|
|
### Edge purge
|
|
|
|
|
|
[Rackspace allows edge-purge](http://www.rackspace.com/blog/cloud-files-cdn-gets-edge-purge/). This is restricted to 25 files a day but can be done per container through customer support.
|
|
|
|
|
|
### TTL settings
|
|
|
|
|
|
[Rackspace allows time-to-live of up to 50 years](http://www.rackspace.com/blog/extending-ttl-for-cloud-files-cdn-users/). Note: Rackspace does not charge for traffic from Cloud Files to the edge locations, so we don't need to do anything for now. |
|
|
\ No newline at end of file |