Skip to content

Commit

Permalink
Edited railties/guides/source/asset_pipeline.textile via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEmpty committed Jul 3, 2011
1 parent caab9f4 commit 47139b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/guides/source/asset_pipeline.textile
Expand Up @@ -32,7 +32,7 @@ h4. Main Features

The first is to concatenate of assets. This is important in a production environment to reduce the number of requests that a client browser has to make to render a web page. While Rails already has a feature to concatenate these types of asset--by placing +:cache => true+ at the end of tags such as +javascript_include_tag+ and +stylesheet_link_tag+--, many people do not use it.

The default behavior in 3.1 + is to concatenate all files into one master file each for JS and CSS, however you can separate files or groups of files if required (see below). In production an MD5 fingerprint is inserted into each filename.
The default behavior in 3.1 and onward is to concatenate all files into one master file each for JS and CSS, however you can separate files or groups of files if required (see below). In production an MD5 fingerprint is inserted into each filename.

The second feature of the pipeline is to minify or compress. For CSS this usually involves removing whitespace and comments. For Javascript more complex processes can be applied.

Expand Down Expand Up @@ -229,8 +229,8 @@ TODO: talk about the +config.assets.precompile+ option and the default matcher f
</erb>


TODO: Not sure what to do with this:
Sprockets also creates a "Gzip":http://en.wikipedia.org/wiki/Gzip (.gz) of your assets. This prevents your server from contently compressing your assets for each request. You must configure your server to use GZip compression and serve the compressed assets in {location}. {Give Apache and NGINX examples since those are what's cool}
Sprockets also creates a "gzip":http://en.wikipedia.org/wiki/Gzip (.gz) of your assets. This prevents your server from contently compressing your assets for each request. You must configure your server to use gzip compression and serve the compressed assets that will be stored in the public/assets folder. The following are some configuration blocks that you can use for common servers.
NGINX & Apache examples?



Expand Down

0 comments on commit 47139b8

Please sign in to comment.