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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:14:02+00:00 2026-05-25T21:14:02+00:00

I am developing a webapp and the browser doesn’t consistently empty the cache each

  • 0

I am developing a webapp and the browser doesn’t consistently empty the cache each time I refresh, so sometimes I’m not getting the latest version of my JavaScript file loaded.

I would like to have a console message indicating if I’m using the latest version of the JavaScript file each time I refresh. I’m thinking that displaying the “last modified” time of the JavaScript file will do the job!

Any thoughts? Is there a standard solution to my problem that I’ve missed?

  • 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-25T21:14:02+00:00Added an answer on May 25, 2026 at 9:14 pm

    For production environments, whenever you modify your script file, you can alter your script tags to include a version querystring, so that the browser sees there is a new version and gets a fresh copy from the server:

    <script type="text/javascript" src="/scripts/myscript.js?v1"></script>
    

    This is just a simple trick that gives the browser a url it hasn’t seen before, forcing it to request the new file. The server ignores the querystring and just returns the script file.

    For development environments, press ctrl+f5 to force the browser to fetch a fresh copy from the server.

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

Sidebar

Related Questions

I am developing PhoneGap webapp where I use some javascript, and sometimes I need
I'm developing a webapp where the user is given the chance to upload his
I'm developing an intranet webapp in asp.net that has a requirement for storing user
I'm developing both a Java app and J2EE webapp using Eclipse Europa on Mac
I'm developing software on google app engine. I'm using the webapp framework. is there
I'm developing a webapp/website on my local machine and won't know the url I'm
i'm developing a webapp for iphone/ipod and using the client's side database. I want
I'm developing webapp using spring 3 mvc and using annotation-based controllers. I want to
I've been developing a webapp using Linq to NHibernate for the past few months,
I'm developing a webapp for the iphone. I'd like to force a certain page

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.