# Javascript\_include\_tag -- time stamp

**URL:** <https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025>\
**Category:** Rails\
**Created:** [December 11, 2006, 6:23pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025 "2006-12-11T18:23:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephanwehner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Post date:** [December 11, 2006, 6:23pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025/1 "2006-12-11T18:23:14Z")

</div>

Using, for example,

\<%= javascript\_include\_tag ‘prototype’ %\>

results in

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

without the timestamp?

Stephan

---

<div class="post-metadata">

**Author:** ![stephanwehner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Post date:** [December 11, 2006, 6:49pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025/2 "2006-12-11T18:49:15Z")

</div>

> since the epoch)
> 
> 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

---

<div class="post-metadata">

**Author:** ![stephanwehner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Post date:** [December 11, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025/3 "2006-12-11T18:57:43Z")

</div>

> Because not all browsers pay attention to that…

Pay attention to what? You mean there are browsers that cache for “too  
long”?

Which browsers are the ones you are referring to?

> Adding the ?123123 forces the browser to try again.

You mean they will reload always?

Stephan

---

<div class="post-metadata">

**Author:** ![stephanwehner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Post date:** [December 11, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-time-stamp/79025/4 "2006-12-11T19:06:17Z")

</div>

Stephan W. wrote:

> Which browsers are the ones you are referring to?  
> In my experience,  
> some times IE cached too much, and annoyed me when I was developing  
> pages.
