aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Dutta <anuj@andhapp.com>2012-12-13 16:28:43 +0000
committerAnuj Dutta <anuj@andhapp.com>2012-12-13 16:28:43 +0000
commite927ba9953519bcd2819a61800a160c9d4dbaf12 (patch)
tree8b27515c5fa8ca64effcca257a21b55de797b58b
parent5a8cb31ef213bcc1ba6349ddd3aea7731f24a096 (diff)
downloadrails-e927ba9953519bcd2819a61800a160c9d4dbaf12.tar.gz
rails-e927ba9953519bcd2819a61800a160c9d4dbaf12.tar.bz2
rails-e927ba9953519bcd2819a61800a160c9d4dbaf12.zip
Add a small note about the compressing the file, and how that helps the application.
-rw-r--r--guides/source/asset_pipeline.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index ff6787dae5..10ba3ab23a 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -272,7 +272,8 @@ $('#logo').attr src: "<%= asset_path('logo.png') %>"
### Manifest Files and Directives
-Sprockets uses manifest files to determine which assets to include and serve. These manifest files contain _directives_ — instructions that tell Sprockets which files to require in order to build a single CSS or JavaScript file. With these directives, Sprockets loads the files specified, processes them if necessary, concatenates them into one single file and then compresses them (if `Rails.application.config.assets.compress` is true). By serving one file rather than many, the load time of pages can be greatly reduced because the browser makes fewer requests.
+Sprockets uses manifest files to determine which assets to include and serve. These manifest files contain _directives_ — instructions that tell Sprockets which files to require in order to build a single CSS or JavaScript file. With these directives, Sprockets loads the files specified, processes them if necessary, concatenates them into one single file and then compresses them (if `Rails.application.config.assets.compress` is true). By serving one file rather than many, the load time of pages can be greatly reduced because the browser makes fewer requests. In addition, compressing one concatenated file, reduces the file size and the browser can download it quicker.
+
For example, a new Rails application includes a default `app/assets/javascripts/application.js` file which contains the following lines: