From 0dc2c57bb3084f0fbbacbbb015e370b1164deb0e Mon Sep 17 00:00:00 2001 From: Richard Hulse Date: Sun, 3 Jul 2011 13:47:24 +1200 Subject: [PATCH] [asset pipeline] Add resources to fingerprinting --- railties/guides/source/asset_pipeline.textile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 1c84564bc4..68106500d0 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -46,8 +46,7 @@ Fingerprinting is a technique where the filenames of content that is static or i When a filename is unique and based on its content, http headers can be set to encourage caches everywhere (at ISPs, in browsers) to keep there own copy of the content. When the content is updated, the fingerprint will change and the remote clients will request the new file. This is generally known as _cachebusting_. -The most common technique is to insert a hash of the content into the name, usually at the end. For example a CSS file +global.css+ is hashed and the filename is updated to incorporate the hash. - +The most effective technique is to insert a hash of the content into the name, usually at the end. For example a CSS file +global.css+ is hashed and the filename is updated to incorporate the hash. global.css => global-908e25f4bf641868d8683022a5b62f54.css @@ -55,7 +54,7 @@ global.css => global-908e25f4bf641868d8683022a5b62f54.css This is the strategy adopted by the Rails asset pipeline. -Rails old strategy was to append a query string to every asset linked with a built-in helper. In the source the generated code looks like this: +Rails old strategy was to append a query string to every asset linked with a built-in helper. In the source the generated code looked like this: /stylesheets/global.css?1309495796