# Strange errors in generated html

**URL:** <https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726>\
**Category:** Rails\
**Created:** [April 7, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726 "2006-04-07T17:01:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [April 7, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726/1 "2006-04-07T17:01:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [April 7, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726/2 "2006-04-07T17:10:22Z")

</div>

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](http://lists.rubyonrails.org/mailman/listinfo/rails)

Mikkel B.

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

---

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [April 7, 2006, 5:31pm UTC](https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726/3 "2006-04-07T17:31:45Z")

</div>

> 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/](http://rimantas.com/)

---

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [April 7, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/strange-errors-in-generated-html/93726/4 "2006-04-07T18:21:05Z")

</div>

Thanks!

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