When I use stylesheet_link_tag, the results come back with a timestamp ID, like this: <link href="/stylesheets/style.css?1154009736" media="screen" rel="Stylesheet" type="text/css" /> I don''t want the query string and ID on the end, but I can''t see how to disable this in the docs. How do I do this? thanks, jeff -- Posted via http://www.ruby-forum.com/.
Jeff, Why don''t you want the timestamp? It makes it so newer versions of your stylesheets are picked up by users who currently have them cached. Very useful. Of course like anything in rails just monkey patch (override) the stylesheet_link_tag method if you really can''t live with it. Zack On 8/4/06, Jeff Cole <rails@jeffcole.net> wrote:> When I use stylesheet_link_tag, the results come back with a timestamp > ID, like this: > > <link href="/stylesheets/style.css?1154009736" media="screen" > rel="Stylesheet" type="text/css" /> > > I don''t want the query string and ID on the end, but I can''t see how to > disable this in the docs. How do I do this? > > thanks, > jeff > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 8/4/06, Jeff Cole <rails@jeffcole.net> wrote:> I don''t want the query string and ID on the end, but I can''t see how to > disable this in the docs. How do I do this?It''s not well documented. Unless the code''s changed recently, which it well might have, you actually have to override #compute_public_path. I''ve written a bit about it on my blog: http://hypsometry.com/blog/on-browser-caching-asset-timestamping-and-rails -- Chris Boone, Hypsometry http://hypsometry.com/ Web Application Design & Development
Seemingly Similar Threads
- caching of javascript and stylesheets
- A number (id?) is added after css/js tags like style.css?1154009736
- stylesheet_link_tag
- Weird stylesheet_link_tag issue after moving servers
- how to print out content of stylesheets in <style> tag via stylesheet_link_tag