aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/asset_pipeline.textile
diff options
context:
space:
mode:
authorJoost Baaij <joost@spacebabies.nl>2012-02-29 09:45:23 +0100
committerJoost Baaij <joost@spacebabies.nl>2012-02-29 09:45:23 +0100
commit5f92bf1ca0dc48d3657f8a419fcf5a819353744f (patch)
tree28b90afea1b2f276312ae58bfaf46bd27811ef9d /railties/guides/source/asset_pipeline.textile
parentc567718dfce4a3eda3b100b641e1b34ee52282f3 (diff)
downloadrails-5f92bf1ca0dc48d3657f8a419fcf5a819353744f.tar.gz
rails-5f92bf1ca0dc48d3657f8a419fcf5a819353744f.tar.bz2
rails-5f92bf1ca0dc48d3657f8a419fcf5a819353744f.zip
Improve header hierarchy.
Diffstat (limited to 'railties/guides/source/asset_pipeline.textile')
-rw-r--r--railties/guides/source/asset_pipeline.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 4b7f1fd6ce..bec1fc909e 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -456,7 +456,7 @@ config.assets.manifest = '/path/to/some/other/location'
NOTE: If there are missing precompiled files in production you will get an <tt>Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError</tt> exception indicating the name of the missing file(s).
-h5. Server Configuration
+h5. Far-future Expires header
Precompiled assets exist on the filesystem and are served directly by your web server. They do not have far-future headers by default, so to get the benefit of fingerprinting you'll have to update your server configuration to add them.
@@ -485,6 +485,8 @@ location ~ ^/assets/ {
}
</plain>
+h5. GZip compression
+
When files are precompiled, Sprockets also creates a "gzipped":http://en.wikipedia.org/wiki/Gzip (.gz) version of your assets. Web servers are typically configured to use a moderate compression ratio as a compromise, but since precompilation happens once, Sprockets uses the maximum compression ratio, thus reducing the size of the data transfer to the minimum. On the other hand, web servers can be configured to serve compressed content directly from disk, rather than deflating non-compressed files themselves.
Nginx is able to do this automatically enabling +gzip_static+: