Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:41:46+00:00 2026-06-05T16:41:46+00:00

When I use javascript_include_tag or stylesheet_link_tag to include files, they have a number at

  • 0

When I use javascript_include_tag or stylesheet_link_tag to include files, they have a number at the end to make it easier to circumvent browser caching (update the file without changing the number, the browser still uses the cached version; change the number, the browser will download and use the updated file).

But where does this number come from? When is it updated? And how can I manually update it?

I’m still using Rails 2.3.9, but I guess answers for any version of Rails would be helpful since I couldn’t find any.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:41:47+00:00Added an answer on June 5, 2026 at 4:41 pm

    Basically, in Rails 2, the number comes from the file’s last modification date, and is added to the link as a query parameter. In Rails 3, it comes from a hash of the file’s contents, and is added to the filename itself. The latter should be an improvement – see this page for more on the difference between the two.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use tabifier in my rails app so I have: <%= stylesheet_link_tag
I want use jQuery in my project. I know the javascript_include_tag calls the jQuery
I'm trying to use the cache option with the javascript_include_tag helper like so: javascript_include_tag
I have just updated my site to use a jQuery plugin jquery.raty.min.js The plugin
I have an error trying to use $(document).ready() as in the above image. What
In rails 3, when using <%= javascript_include_tag :defaults %> , it includes a number
I noticed Facebook does this where they have a meta refresh enclosed in a
I'd like to use javascript_include_tag to grab all view related scripts using recursion, which
Rails 3.0.11, Ruby 1.9.3 When I use a javascript_include_tag(js/datepicker) in my view file it
I have seen this asked before on here but couldn't use the suggested solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.