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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:27:51+00:00 2026-05-25T18:27:51+00:00

I recently made a website and I made a change to a .js file,

  • 0

I recently made a website and I made a change to a .js file, but when I delete the .js file from the FTP server and upload the new one, the new file doesn’t show up on the website. I checked the source code behind the .js file on the website and it’s not right, it’s showing the source for the old file, not the new one even though the old one is gone. Is that because my browser cached the .js file?

Note: I have this source

<meta http-equiv="cache-control" content="no-cache" />

on my page to stop the browser from caching my page, and I know that works on the HTML, but with that source there, do the resource files still get cached?

I don’t have that line of code on my other pages, just my home page, but the .js file is still referenced on the other pages so perhaps that is how it is getting cached?

Furthermore, is there a way to check your browsers cache? I use chrome.

Edit: I just cleared my browsers cache and reloaded the website and the file worked as it should now, so that means the file did get cached. So now my question becomes how to I prevent a resource file from being cached?

  • 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-25T18:27:52+00:00Added an answer on May 25, 2026 at 6:27 pm

    I am not positive that no-cache meta tag is the way to go. It negates all caching and kind defeats the purpose of quickly accessible pages.

    Also, AFAIK, meta tag works per page, so if you have a page without it that references your JS – it will be cached.

    The widely acceptable way of preventing JS files (and, again, CSS) from being cached is to differentiate the requests for them:

    Say, you have:

    <script type=”text/JavaScript” src=”somescript.js″></script>
    

    this one will cache it (unless the above meta-tag is present.

    What you want to have is that on each page load the above line looks different (URL-wise) like so:

    <script type=”text/JavaScript” src=”somescript.js?some-randomly-generated-string″></script>
    

    Same goes for CSS.

    If you were using some sort of JS network – it would take care of that for you had you given it some sort of “no-cache” configuration option.

    You, of course, can do it in pure JS too. Some sort of Date related string is an option.


    Now, normally, you would not want to negate all the caching, so the way to do so is to add a version parameter to your URL:

    <script type=”text/JavaScript” src=”somescript.js?version=1.0.0″></script>
    

    and manage your scripts from there.

    EDIT

    There is no need for any additional extension. Unless I am sorely mistaken, “Chrome Developer Tools” is built in in all Chrome versions (in beta and dev, for sure) and is accessible by pressing Ctrl-Shift-I. There, in “Network” tab, you can see all your requests, there content and headers.

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

Sidebar

Related Questions

So I have a website that I recently made changes to, and one of
I recently made a website, and it works fine on all browsers, but on
Recently I made a bunch of changes to my local svn config file. Mainly
Having made the jump just recently from XEmacs to GNU Emacs, I'm really loving
I recently reimaged my PC and regrabbed one of our projects from Source Safe.
Recently I installed a certificate on the website I'm working on. I've made as
We've recently moved our company website to a new host. It is an ASP.NET
I need help, I'm new to the WCF world having recently made the transition
My English is like 3years old baby. Recently, I made a website with Many
Ok. I recently made some updates to this website. http://annberingerart.com/index.php Upon making some minor

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.