# javascript\_include\_tag -- time stamp

**URL:** <https://discuss.rubyonrails.org/t/javascript-include-tag-time-stamp/5702>\
**Category:** rubyonrails-talk\
**Created:** [December 11, 2006, 5:54pm UTC](https://discuss.rubyonrails.org/t/javascript-include-tag-time-stamp/5702 "2006-12-11T17:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Hallstrom1](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@Philip\_Hallstrom1](https://discuss.rubyonrails.org/u/Philip_Hallstrom1)\
**Post date:** [December 11, 2006, 5:54pm UTC](https://discuss.rubyonrails.org/t/javascript-include-tag-time-stamp/5702/1 "2006-12-11T17:54:38Z")

</div>

> Using, for example,
> 
> \<%= javascript\_include\_tag 'prototype' %\>
> 
> results in
> 
> \<script src="/javascripts/prototype.js?1164912447" type="text/javascript"\>\</script\>
> 
> I take it the number 1164912447 is the timestamp of the file (in seconds since the epoch)
> 
> Isn't it redundant to include this information? Isn't part of the HTTP protocol to check whether the client already has an up-to-date version of the file requested?
> 
> In other words, why doesn't
> 
> \<%= javascript\_include\_tag 'prototype' %\>
> 
> just produce
> 
> \<script src="/javascripts/prototype.js" type="text/javascript"\>\</script\>
> 
> without the timestamp?

Because not all browsers pay attention to that... or they decide to cache it for X hours/days on their own and don't even bother to check. Adding the ?123123 forces the browser to try again.

-philip
