helzer
2007-Aug-09 17:01 UTC
javascript_include_tag - release number instead of time stamp
I''ve noticed that the major part of my pages'' load time is the Javascript for prototype and effects. Instead of forcing a reload per request (by attaching the ?timestamp parameter), I''d like to force reload this per release. Right now, I load the CSS and JS manually (without the Rails helpers) and just append a release number manually. It''s OK, but when I forget, the CSS / JS don''t update. Is there any way for the Layout template to access the release number? Thanks, Amir --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
javier ramirez
2007-Aug-09 17:22 UTC
Re: javascript_include_tag - release number instead of time stamp
Hi,> Javascript for prototype and effects. Instead of forcing a reload per > request (by attaching the ?timestamp parameter), I''d like to force > reload this per release. >Actually it''s not a per-request reload The timestamp is not the current time, but the timestamp of when the file was last updated. By doing this, js, images, css.. have the same signature (timestamp included) as long as you don''t modify them, which is fine. Your browser should detect the file name is the same and use the cached version. No need for anything else. regards, javier ramÃrez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2007-Aug-09 17:38 UTC
Re: javascript_include_tag - release number instead of time stamp
> I''ve noticed that the major part of my pages'' load time is the > Javascript for prototype and effects. Instead of forcing a reload per > request (by attaching the ?timestamp parameter), I''d like to force > reload this per release. > > Right now, I load the CSS and JS manually (without the Rails helpers) > and just append a release number manually. It''s OK, but when I forget, > the CSS / JS don''t update. > > Is there any way for the Layout template to access the release number?This might be of use... http://agilewebdevelopment.com/plugins/assetpackager --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
helzer
2007-Aug-09 18:05 UTC
Re: javascript_include_tag - release number instead of time stamp
Thanks a lot Philip,> http://agilewebdevelopment.com/plugins/assetpackagerThis came in right on time, just as I was planning to reinvent the wheel. Amir --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---