aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman@gmail.com>2016-04-29 13:14:30 -0500
committerRichard Schneeman <richard.schneeman@gmail.com>2016-04-29 13:14:30 -0500
commitb1049e7fad57981f2f2b2c94c27d912e04cc965f (patch)
treeb5bcd555a1a3d19277ade663669fe4db9cbc03f6 /guides
parent9d1bf059c0a570f68b2394bfb383434a6b0d0a49 (diff)
parent4a5bef22dac5fe9fad58065006a231746d73689f (diff)
downloadrails-b1049e7fad57981f2f2b2c94c27d912e04cc965f.tar.gz
rails-b1049e7fad57981f2f2b2c94c27d912e04cc965f.tar.bz2
rails-b1049e7fad57981f2f2b2c94c27d912e04cc965f.zip
Merge pull request #24786 from vipulnsward/document-gzip-assets
Document config.assets.gzip flag.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/asset_pipeline.md11
-rw-r--r--guides/source/configuring.md2
2 files changed, 13 insertions, 0 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index cc3da47db9..bb04e5e94c 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -1111,6 +1111,17 @@ effect on the application. Instead, setting `config.assets.css_compressor` and
`config.assets.js_compressor` will control compression of CSS and JavaScript
assets.
+
+### Serving GZipped version of assets
+
+By default, gzipped version of compiled assets will be generated, along
+with the non-gzipped version of assets. Gzipped assets help reduce, the transmission of
+date over the wire. You can configure this by setting the `gzip` flag.
+
+```ruby
+config.assets.gzip = false # disable gzipped assets generation
+```
+
### Using Your Own Compressor
The compressor config settings for CSS and JavaScript also take any object.
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index e9836135e8..b22dc27743 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -163,6 +163,8 @@ pipeline is enabled. It is set to true by default.
* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:closure`, `:uglifier` and `:yui` which require the use of the `closure-compiler`, `uglifier` or `yui-compressor` gems respectively.
+* `config.assets.gzip` a flag that enables the creation of gziped version of compiled assets, along with non-gziped assets. Set to `true` by default.
+
* `config.assets.paths` contains the paths which are used to look for assets. Appending paths to this configuration option will cause those paths to be used in the search for assets.
* `config.assets.precompile` allows you to specify additional assets (other than `application.css` and `application.js`) which are to be precompiled when `rake assets:precompile` is run.