Strange errors in generated html


#1

Hi!

This:
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag ‘doitwithstyle’ %>

generates this:

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?


#2

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”>
got it on every rails page. I’m not sure if it was before. Everything
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
ting.minline.dk - Buy Old Stuff!(DK)


#3

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/


#4

Thanks!

I was worried i messed something while upgrading rails to new version.