# Remove session string from css and js file?

**URL:** <https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325>\
**Category:** Rails\
**Created:** [June 20, 2007, 3:30pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325 "2007-06-20T15:30:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickmenow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@nickmenow](https://www.ruby-forum.com/u/nickmenow)\
**Post date:** [June 20, 2007, 3:30pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325/1 "2007-06-20T15:30:58Z")

</div>

How do you remove the session string from the css and js file?  
I have already set the ApplicationController session :disabled =\> true

Any suggestions or a site that already has this solution?

Thank you,

Nickmenow

---

<div class="post-metadata">

**Author:** ![nickmenow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@nickmenow](https://www.ruby-forum.com/u/nickmenow)\
**Post date:** [June 20, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325/2 "2007-06-20T15:32:03Z")

</div>

NICKMENOW wrote:

> How do you remove the session string from the css and js file?  
> I have already set the ApplicationController session :disabled =\> true
> 
> Any suggestions or a site that already has this solution?
> 
> Thank you,
> 
> Nickmenow

Sorry I forgot the example =\> .js?1168472848

---

<div class="post-metadata">

**Author:** ![nickmenow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@nickmenow](https://www.ruby-forum.com/u/nickmenow)\
**Post date:** [June 20, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325/3 "2007-06-20T15:54:47Z")

</div>

On 6/20/07, NICKMENOW [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Sorry I forgot the example =\> .js?1168472848

That’s not the session string; it’s the mtime for the javascript file.  
There’s a pretty good writeup on this at [Blog - Catamount Hardware](http://hypsometry.com/blog/)  
(search for “on browser caching”).

Why do you want to remove it?

---

<div class="post-metadata">

**Author:** ![nickmenow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@nickmenow](https://www.ruby-forum.com/u/nickmenow)\
**Post date:** [June 20, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325/4 "2007-06-20T16:34:01Z")

</div>

Thank you to Bob S…

Here is what I have found out. To turn off Tim Lucus’ plugin for Asset  
Timestamping (Rails default since Rails 1.12.1 add this to your  
root/config/environment.rd file

ENV[“RAILS\_ASSET\_ID”] = ‘’

Restart the server and reload the page.

---

<div class="post-metadata">

**Author:** ![nickmenow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@nickmenow](https://www.ruby-forum.com/u/nickmenow)\
**Post date:** [June 20, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/remove-session-string-from-css-and-js-file/107325/5 "2007-06-20T16:21:34Z")

</div>

Bob S. wrote:

> On 6/20/07, NICKMENOW [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Sorry I forgot the example =\> .js?1168472848
> 
> That’s not the session string; it’s the mtime for the javascript file.  
> There’s a pretty good writeup on this at [Blog - Catamount Hardware](http://hypsometry.com/blog/)  
> (search for “on browser caching”).
> 
> Why do you want to remove it?

Thank you for the reply…I’m going to go look at it now.

I need to remove it so I can eliminate various troubles I am having with  
a “site grabber” program that I am using. The site grabber grabs the  
site and puts all the static data into a set of HTML files that can be  
used off line. Sales and the CEO are unable to use RoR. The prototypes  
are static versions of applications anyway - no DB and no dynamic data.  
I use RoR for many attractive qualities like the rapid development,  
agile changes and MVC organization because the prototypes get changed so  
often. Do you know of a GEM, plugin or anything else that will take a  
RoR site and make it pure HTML files? Keeping file structure and  
eliminating the need to see a file extension will be a bonus.
