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 9145439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:30:53+00:00 2026-06-17T10:30:53+00:00

I have a number of js files that I put in an another folder

  • 0

I have a number of js files that I put in an another folder for ease of updating and for sharing between different pages. These files are called from another page and I use the

<script type="text/javascript" src="/js/file.js"></script>

notation.

This works fine but when I change something in one of these js files, the browser (chrome, firefox, safari) still loads the previous version without the changes, therefore not updating the js file it uses to the updated one. I tried to clean out the cache to force it to load the js file again (with the changes), but to no avail.

The only workaround that I have is to rename the external file to file2.js and include that in the page calling it but it is a tedious process because if I make another change I have to change the name to file3.js, etc.

Is there a way to force the browser to reload the original js and not use a previously stored one>

  • 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-17T10:30:54+00:00Added an answer on June 17, 2026 at 10:30 am

    You can force the refresh by adding something unique in the URL:

    In the code below the string “d6aa97d33d459ea3670056e737c99a3d” has to be generated for each request. You can use a timestamp, a hash, a random number, whatever you want.
    Because of this, the browser will not reuse what he has in cache and will always download the JS file.

    <script type="text/javascript" src="/js/file.js?d6aa97d33d459ea3670056e737c99a3d"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at files that all have a different version number that starts at
I have a large number of csv files that look like this below: xxxxxxxx
I have a number of large data files that I included in projects attributed
I have a number of data files to process from a data warehouse that
I have a bunch of pdf files that starts with a unique number. And
I have developed a Java program that will count the number of files in
Edit: Brief Summary I have number files in a directory, called crash0, crash1 etc.
I have a number of images and a CSV data file that I want
I have a file that contain huge number of net names. I would like
I have a file that I set using PowerShell that contains the version number

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.