michael.hasenstein@googlemail.com
2010-May-15 15:22 UTC
Asset tag helper and (Google) cache recommendations
Doesn''t he have a point? Shouldn''t Rails'' asset tag helper(s) be changed accordingly? http://github.com/eliotsykes/asset_fingerprint Quote (http://code.google.com/speed/page-speed/docs/caching.html): Recommendations Don''t include a query string in the URL for static resources. Most proxies, most notably Squid up through version 3.0, do not cache resources with a "?" in their URL even if a Cache-control: public header is present in the response. To enable proxy caching for these resources, remove query strings from references to static resources, and instead encode the parameters into the file names themselves. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Xavier Noria
2010-May-15 15:35 UTC
Re: Asset tag helper and (Google) cache recommendations
On Sat, May 15, 2010 at 5:22 PM, michael.hasenstein@googlemail.com <michael.hasenstein@googlemail.com> wrote:> Doesn''t he have a point? Shouldn''t Rails'' asset tag helper(s) be > changed accordingly? > > http://github.com/eliotsykes/asset_fingerprint > > > Quote (http://code.google.com/speed/page-speed/docs/caching.html): > > Recommendations > > Don''t include a query string in the URL for static resources. > Most proxies, most notably Squid up through version 3.0, do not > cache resources with a "?" in their URL even if a Cache-control: > public header is present in the response. To enable proxy caching for > these resources, remove query strings from references to static > resources, and instead encode the parameters into the file names > themselves.There was precisely a discussion yesterday about this, and we had a look into that plugin. The plugin looks good to me, and it offers also hashing which is good for a multi-server setup. I personally think it would be nice to merge or at least to serve as inspiration to extend the current functionality. It would be good to have real numbers about how many hits an app may save due to cache proxies. You know, to take an informed decision and to be able to document something more concrete about when some option would be better than another and why. Have people working with renamed virtual filenames found any gotchas in practice worth taking into account? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.