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

  • Home
  • SEARCH
  • 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 6930407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:26:35+00:00 2026-05-27T11:26:35+00:00

RequireJS seems to do something internally that caches required javascript files. If I make

  • 0

RequireJS seems to do something internally that caches required javascript files. If I make a change to one of the required files, I have to rename the file in order for the changes to be applied.

The common trick of appending a version number as a querystring param to the end of the filename does not work with requirejs <script src="jsfile.js?v2"></script>

What I am looking for is a way to prevent this internal cacheing of RequireJS required scripts without having to rename my script files every time they are updated.

Cross-Platform Solution:

I am now using urlArgs: "bust=" + (new Date()).getTime() for automatic cache-busting during development and urlArgs: "bust=v2" for production where I increment the hard-coded version num after rolling out an updated required script.

Note:

@Dustin Getz mentioned in a recent answer that Chrome Developer Tools will drop breakpoints during debugging when Javascript files are continuously refreshed like this. One workaround is to write debugger; in code to trigger a breakpoint in most Javascript debuggers.

Server-Specific Solutions:

For specific solutions that may work better for your server environment such as Node or Apache, see some of the answers below.

  • 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-05-27T11:26:36+00:00Added an answer on May 27, 2026 at 11:26 am

    RequireJS can be configured to append a value to each of the script urls for cache busting.

    From the RequireJS documentation (http://requirejs.org/docs/api.html#config):

    urlArgs: Extra query string arguments appended to URLs that RequireJS
    uses to fetch resources. Most useful to cache bust when the browser or
    server is not configured correctly.

    Example, appending “v2” to all scripts:

    require.config({
        urlArgs: "bust=v2"
    });
    

    For development purposes, you can force RequireJS to bypass the cache by appending a timestamp:

    require.config({
        urlArgs: "bust=" + (new Date()).getTime()
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still working on a particular RDF file, but seems that something is not
I can't seems to change the default color of the required field validator. In
Based on the code I've found, it seems that the Visitor is required to
I'm starting to play with arrays, but i'm stuck with something that seems yet
My question: I have a mysql database that consists of something like a fact
Say I have django model that looks something like this: class Order(models.Model): number =
A lot of programming languages and frameworks do/allow/require something that I can't seem to
It seems that any kind of graphic library like DirectFB or MiniGui requires some
To me, this seems to make little sense, but after reading the information in
I'm building this iPhone application to connect to a secured TFS server (one that

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.