Joe Joe - 1 year ago 143
Javascript Question

Visual Studio 2013 caching older version of .js file

I am working on a small web api project in Visual Studio 2013 Ultimate. Windows 2013. Internet Explorer 9. When I run (debug) from VS using the internal web server (I guess that is IIS Express, now), I am finding that the changes I am making (and saving) to a javascript page are being ignored. Placing a break point in the javascript shows the older code without my changes.

CTRL-F5 does not force the application to use the currently save page. Cheching the page in, then checking it back out often works. Is there some setting or trick that will help me out here?

Answer Source

Clearing the cache history seemed a bit excessive and I don't want to do that all the time.

The following solution worked me in Internet Explorer: First enable script debugging:

  1. Tools menu -> select Internet Options
  2. On advance tab uncheck "Disable script debugging (Internet Explorer)"

Then make sure you get the newest page:

  1. From the Tools menu choose Internet Options.
  2. On the General tab, under Browsing history, click Settings.
  3. Under "Check for newer versions of stored pages" make sure "Every time I visit the webpage" is selected.
  4. Click the OK button.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download