locked
VS2015 ignoring changes to .js files RRS feed

  • Question

  • User269416624 posted

    I have an mvc project in vs2015 that I've been working on for 3 years now..  I just cloned the repository fresh this morning. When I ran the code, I noticed that there was a bug in one of the .js files (javascript).  So I fixed it and ran the code again.  Unfortunately, VS is still running the 'old' .js code - the code with the error.  I've saved the .js file in question, restarted VS and Windows.  No success.  For some reason VS insists on using the code with the error at runtime.  Everything looks fine in the designer.

    This seems really strange.  I'm not sure if it's VS related or has something to do with gitExtensions.

    Anybody ran into this before?

    Friday, March 31, 2017 7:32 PM

Answers

  • User2117486576 posted

    It sounds like the browser is cacheing the js files.  Js files are just text files to the browser.  Have you tried doing a Ctrl-F5 to force a page refresh with an empty cache?

    If that is the issue then check out the various strategies for "browser cache busting".  Here's one:

    http://madskristensen.net/post/cache-busting-in-aspnet

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 31, 2017 9:11 PM

All replies

  • User2117486576 posted

    It sounds like the browser is cacheing the js files.  Js files are just text files to the browser.  Have you tried doing a Ctrl-F5 to force a page refresh with an empty cache?

    If that is the issue then check out the various strategies for "browser cache busting".  Here's one:

    http://madskristensen.net/post/cache-busting-in-aspnet

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 31, 2017 9:11 PM
  • User269416624 posted

    Yep, that was it!  Whew - thought I was loosing my mind.  :)  I'll check out that link and see if there's anything I can tweak to prevent this from happening again. 

    Thanks again!

    Friday, March 31, 2017 9:25 PM