fredistic
2007-Nov-13 19:08 UTC
Why does Rails generate random numbers: thing?1194897572 ??
Rails generated: <img alt="Mediumg" height="160" src="/images/Art/mediumg.png? 1194897572" width="121" /> from: <%= image_tag("/images/Art/mediumg.png", :size => "121x160") %> The filename is appended with a question mark and a random number. What''s it for? It does the same thing on link tags. -------------- Also, is there a way to get Rails to stop generating the trailing slash? I suspect it''s harmless but it''s not part of HTML. fredistic --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jeremy Kemper
2007-Nov-13 19:16 UTC
Re: Why does Rails generate random numbers: thing?1194897572 ??
On 11/13/07, fredistic <fredistic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails generated: > <img alt="Mediumg" height="160" src="/images/Art/mediumg.png? > 1194897572" > width="121" /> > > from: > <%= image_tag("/images/Art/mediumg.png", :size => "121x160") %> > > The filename is appended with a question mark and a random number. > What''s it for? It does the same thing on link tags.It''s the file timestamp; it''s appended so that proxies and browsers caches work correctly when a new version of the file is deployed. You can turn it on and off.> Also, is there a way to get Rails to stop generating the trailing > slash? I suspect it''s harmless but it''s not part of HTML.Nope. This has been discussed here before. jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Stuart Saunders
2007-Nov-13 20:13 UTC
Re: Why does Rails generate random numbers: thing?1194897572 ??
http://blog.hypsometry.com/archives/2006/5/18/on_browser_caching_asset_timestamping/ http://www.thescripts.com/forum/thread500324.html On Nov 13, 2:08 pm, fredistic <fredis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails generated: > <img alt="Mediumg" height="160" src="/images/Art/mediumg.png? > 1194897572" > width="121" /> > > from: > <%= image_tag("/images/Art/mediumg.png", :size => "121x160") %> > > The filename is appended with a question mark and a random number. > What''s it for? It does the same thing on link tags. > > -------------- > > Also, is there a way to get Rails to stop generating the trailing > slash? I suspect it''s harmless but it''s not part of HTML. > > fredistic--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Michael Graff
2007-Nov-16 16:09 UTC
Re: Why does Rails generate random numbers: thing?1194897572 ??
The trailing slash IS part of xhtml. It is harmless in HTML. that is, tags without an ending in xhtml look like: <img ... /> while tags with an ending tag look like: <a href=...>something </a> this is a good thing. It means your code is xhtml (aka xml) and makes parsing it better. I suggest you write to modern standards, not 1990 ones. --Michael --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---