0

I am developing a web addin for MS Word.

The documents that load in the Script Documents section of VS when running the project is loading cached version of my JS files.

Things I have tried

  • Clear and rebuild the solution.
  • Removing IIS web sites via cmd clearing IISExpress cache
  • Deleted the cache in IE as per another thread I read, I've lost the link for that one.
  • Renamed the JS files and referencing the new ones in the html but then they didn't appear in the Scripts Documents so I am assuming the HTML file is cached as well.
  • Deleting all the temp files in my APPDATA, delete IIS Express sites, clean, restart computer, clean again, rebuild, run and still my old JS file, without the changes, comes up for debugging.

How can I clear the cache in the Word add in so that it is forced to pull new JS version.

So far the only consistent thing is to wait some long period of time and then the changes to the JS file are reflected.

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
russelrillema
  • 452
  • 7
  • 14
  • Open chrome's developer tool & then right-click on the reload button of the browser. Press Empty Cache & Hard Reload. – Ankush Jain Oct 23 '19 at 12:13
  • @AnkushJain I am talking about an MS Word Web Addin. It loads inside of MS Word not inside of chrome. Are you suggesting that doing that on a blank tab in chrome would resolve the caching issue in MS Word? – russelrillema Oct 23 '19 at 12:51
  • In case someone else ends up here my word around at the moment is to comment out all of the interactions with the word document it's self and simply debug in Chrome. Luckily my use case interacts with the document very little and the biggest part of the plugin is getting the data from my API. Once I have that all working I will put the word stuff back in and test in word itself. – russelrillema Oct 24 '19 at 04:24
  • I've also tried setting tags in the Home.html file to turn off caching (i.e. cache-control, expires, and pragma no-cache) to no avail. The only thing that has worked is to reboot the machine which seems extreme but does get me working again. – Paul H. Mar 01 '23 at 12:38

1 Answers1

0

I've run into this problem a couple times and the first time appeared to be fixed by a restart of the computer after trying everything that the OP listed above. It happened a second time today and a restart (including all the things above) did not fix the problem.

Periodically I am side-loading the addin from a network shared folder on the local machine (following the steps outlined here: https://github.com/OfficeDev/Word-Add-in-JS-Redact). I thought perhaps updating the manifest and refreshing the addin might cause a reload of some cached files. This appeared to work but, as before, it may have been a fluke of timing. The problem only appears sporadically so I can't re-test to see if that actually fixed the problem. I'll update here if it happens again and this does, or does not, fix the problem.

Paul H.
  • 158
  • 8