How to enure the latest JS code is loaded by Task Pane add-in?

一个人想着一个人 提交于 2019-12-08 08:12:55

问题


I am running into an issue with my Task Pane add-in when running it in desktop Excel 2016 on the Mac (OSX). I have deployed the first version of the add-in to a web server and successfully inserted a reference to the add-in's manifest into an Excel workbook and can see it working on the client box (the Mac). Then I made a few changes to some JavaScript code in my add-in's "foo.js" and then deployed those changes to the web server. Now when I open the workbook I do not see the behavior I expect from the new version of foo.js, rather the old behavior is seen.

What I have tried:

  1. On the same Mac, loaded foo.js directly from the web app in Safari. I can see the changes in the js code that I expect to be in the second version.

  2. Cleared the Safari cache (I suspected that this would not work based on #1 - Safari does not appear to share a cache with Excel but worth a shot) - did not change anything.

  3. Poked around under ~/Library/Containers/com.microsoft.Excel trying to find a cache - deleted ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches/com.microsoft.Excel - no help.

  4. Use the Reload menu item from the Task Pane's context menu (looks like [i] on the Mac) - no difference: still seeing old foo.js.

How can I get Excel/the embedded web browser component to retrieve the new foo.js?


回答1:


If your HTML is refreshing correctly, disable caching entirely on your page with content="nocache" (further details at Using <meta> tags to turn off caching in all browsers?).

Also, just to make sure, clearing the cache: ⌥+⌘+E > Privacy > Remove All Website Data



来源:https://stackoverflow.com/questions/38234067/how-to-enure-the-latest-js-code-is-loaded-by-task-pane-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!