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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:57:50+00:00 2026-05-18T10:57:50+00:00

I have an ASP.NET 3.5 web application written in VS 2010. I have an

  • 0

I have an ASP.NET 3.5 web application written in VS 2010. I have an aspx with a script reference to a .js file that resides in a Scripts folder.

<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/HeaderControl.js" type="text/javascript"></script>

Within the .js file I’m using jQuery to do some various operations, one of which was simply a debugging statement that used alert to spit out a value on the page so I could see what it was.

if ($) {
    $(document).ready(function () {
        $("input[id='q']").click(function($e) {
            alert("clicked");
        });
    });
}

This all worked great until I went to remove the debug statement (the alert “clicked”). Upon completely removing it from the .js, I rebuilt the project, hit F5 to run it on my localmachine, but as soon as I clicked upon the input tag above the alert still popped up and said “clicked”. I tried one thing after another trying to get the web app to realize that the .js had been changed, but it kept displaying the alert every time that I’d click on the input tag. I finally decided to rename the .js to something completely different, at which time the web app realized that the .js had been changed and it quit displaying the alert when I’d click upon the input tag.

So why was this .js file being cached? It’s a very annoying behavior and I’d love to know what exactly was causing it. Any help would be appreciated. Thanks!

EDIT:
Browser was IE7. I didn’t check to see if it did it in Mozilla as well. Regardless, I’ve done at least a 100 different .js files and I’ve never noticed this behavior before. The only difference for me is that this .js is in a web app, whereas usually I’m creating them in ASP.NET web site projects.

  • 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-18T10:57:50+00:00Added an answer on May 18, 2026 at 10:57 am

    You need to Shift + Refresh, or, just clear your browser’s cache.

    This is normal behavior:

    Javascript and CSS files do not even check for a new version (an If-Modified-Since request) if the old version is still valid according to the cache headers in the response sent the first time.

    I believe that if you put in any query string, even just ?, at the end of the url (i.e., Scripts/jquery-1.4.1.min.js?) some browsers (Firefox at least) will change to check for a new version of the file every time like it will for images. This could be useful during development.

    Some developers will also append a version to the file (?123) so that they can cause the browser to ignore the cache completely when a new version of a web app is released. I’m not sure how effective this is if you already have a question mark at the end, since it will be looking for an updated version anyway (again, not sure about all browsers).

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

Sidebar

Related Questions

Background We have an asp.net 4.0 web application written in C# that calls a
I have an asp.net web application written in C# using a SQL Server 2008
I have a web application written in ASP.NEt/C# and javascript. It uses session variables.
I have written an ASP.NET MVC3 Web application which runs perfectly inside the Visual
I have in here an old web application written in ASP.Net 2.0 + AJAX.
I have a asp.net web application that uses C#. It logs in on a
We have a ASP.NET web application written in VB.NET where we build content programmatically
I currently have a web application written by ASP.NET MVC. Now I want to
I have a forum like web application written in Asp.net MVC. I'm trying to
Something weird that I've been seeing, a web application written in ASP.Net (C#) 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.