带有Excel和Edge Webview的Office-js插件-如何删除缓存? [英] Office-js addin with Excel and Edge Webview - how to delete cache?

查看:334
本文介绍了带有Excel和Edge Webview的Office-js插件-如何删除缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为Excel开发一个office-js javascript插件.我们正在Windows的Excel中通过侧面加载来测试插件.将Windows和Excel更新到新版本后,Office/Excel中的Web视图已从IE更改为Edge.现在,我们需要删除Edge浏览器缓存,以查看更新的Web服务中的更改.

We are developing an office-js javascript addin for Excel. We are testing the addin with sideloading in Excel on Windows. After updating Windows and Excel to new versions, the webview in Office/Excel has changed from IE to Edge. Now we need to delete the Edge browser cache in order to see the changes in the updated web service.

要完全重新加载侧面加载的office插件,只需删除本地存储和IE浏览器缓存. 更新到Edge Webview之后,我们无法清除浏览器缓存.

To completely reload a sideloaded office-addin, it was sufficient to delete the local storage and IE browser cache. After updating to the Edge webview, we do not manage to clear the browser cache.

在IE中,我们可以通过以下方式刷新本地存储和浏览器缓存: del/q/s/f C:\ Users \用户名\ AppData \ Local \ Microsoft \ Windows \ Caches del/q/s/f C:\ Users \用户名\ AppData \ Local \ Microsoft \ Windows \ INetCache del/q/s/f C:\ Users \用户名\ AppData \ Local \ Microsoft \ Office \ 16.0 \ WEF

In IE, we could flush the local storage and browser cache this way: del /q /s /f C:\Users\username\AppData\Local\Microsoft\Windows\Caches del /q /s /f C:\Users\ username\AppData\Local\Microsoft\Windows\INetCache del /q /s /f C:\Users\ username\AppData\Local\Microsoft\Office\16.0\WEF

psexec.exe -l c:\ windows \ system32 \ RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4359

psexec.exe -l c:\windows\system32\RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4359

我们也可以通过Internet选项对话框来删除IE缓存,而不是psexec(sysinternals).

Instead of psexec (sysinternals) we could as well delete the IE cache via the internet options dialog.

为了删除边缘缓存,我们尝试了 删除/q/s/f C:\ Users \ username \ AppData \ Local \ Packages \ Microsoft.MicrosoftEdge_8wekyb3d8bbwe \ AC 或通过打开Edge浏览器端通过UI删除缓存.

In order to delete the Edge cache, we tried del /q /s /f C:\Users\username\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC or by opening the Edge browser end delete the cache via the UI.

不幸的是,Edge缓存似乎没有被完全删除,office插件没有完全显示来自Web服务的更改内容.

Unfortunately the Edge cache seems to be not completely deleted, the office addin does not completely show the changed contents from the web service.

推荐答案

首先-手动删除不是一个好习惯-正如@Rick Kirkham所说,使用标准的Web技术进行适当的缓存. 如果您想这样做,请按照以下步骤列出 Edge WebViewHost 的缓存文件:

First - manually deleting is not a good practice - as @Rick Kirkham said use standard web techniques for proper caching. If you want to do it the hard way - list the cached files for the Edge WebViewHost like this:

dir /s %LOCALAPPDATA%\Packages\Microsoft.Win32WebViewHost_cw5n1h2txyewy\AC\#!123\INetCache\

该系统目录不可见. 清空我使用的内容:

This system directory is not visible. To empty the contents I used:

del /s /f /q %LOCALAPPDATA%\Packages\Microsoft.Win32WebViewHost_cw5n1h2txyewy\AC\#!123\INetCache\

在我们的情况下,我们使用 Azure App Service(IIS)作为我们后端的服务器. 并且我们添加了以下web.config设置,以允许客户端重新验证所有缓存的文件:

In our case we are using Azure App Service (IIS) as server for our backend. And we added the following web.config setting to let the client re-validate all cached files:

...
  <system.webServer>
    <staticContent>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:00:00" cacheControlCustom="must-revalidate" />
    </staticContent>
...

这篇关于带有Excel和Edge Webview的Office-js插件-如何删除缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆