Forum: Ruby on Rails Strange errors in generated html

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F639e0cdf2fa098b535d6ec766b2aee1?d=identicon&s=25 Szymon Nowak (g0nzo)
on 2006-04-07 17:01
Hi!

This:
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag 'doitwithstyle' %>

generates this:
<script src="/javascripts/prototype.js?1144418901"
type="text/javascript"></script>
<script src="/javascripts/effects.js?1144418901"
type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1144418901"
type="text/javascript"></script>
<script src="/javascripts/controls.js?1144418901"
type="text/javascript"></script>
<script src="/javascripts/application.js?1144418901"
type="text/javascript"></script>
<link href="/stylesheets/doitwithstyle.css?1144421253" media="screen"
rel="Stylesheet" type="text/css" />

What are these numbers? I installed rails 1.1.1 (linux) today and i've
got it on every rails page. I'm not sure if it was before. Everything
works ok, just the generated code looks weird.

BTW. I've got warnings about RAILS_GEM_VERSION already defined somewhere
else (one definition is in environment.rb). Should i do something about
it or just leave it?
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Mikkel Bruun (Guest)
on 2006-04-07 17:10
(Received via mailing list)
the numbers are random strings (current time??) added in development to
force a reload of js and css files...

otherwise some browsers will cache the files...
its my undestanding that this is only in effect in development


On Friday, April 07, 2006, at 5:01 PM, szymek wrote:
>type="text/javascript"></script>
>got it on every rails page. I'm not sure if it was before. Everything
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails


Mikkel Bruun

www.strongside.dk    - Football Portal(DK)
ting.minline.dk      - Buy Old Stuff!(DK)
Ec5a599777854c540fd102ef4691fe10?d=identicon&s=25 Rimantas Liubertas (Guest)
on 2006-04-07 17:31
(Received via mailing list)
> the numbers are random strings (current time??) added in development to
> force a reload of js and css files...
>
> otherwise some browsers will cache the files...
> its my undestanding that this is only in effect in development

These are not random, but simple file modification time:
File.mtime().to_i.to_s
AFAIK their generation does not depend on environment, be it
development or production.
Whenever you modify your .js or .css string changes and browser will
fetch new
version instead of using the cached one.

Regards,
Rimantas
--
http://rimantas.com/
F639e0cdf2fa098b535d6ec766b2aee1?d=identicon&s=25 Szymon Nowak (g0nzo)
on 2006-04-07 18:21
Thanks!

I was worried i messed something while upgrading rails to new version.
This topic is locked and can not be replied to.