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

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

问题描述

我们正在为 Excel 开发 office-js javascript 插件.我们正在 Windows 上的 Excel 中使用旁加载测试插件.Windows 和 Excel 更新到新版本后,Office/Excel 中的 webview 已经从 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:UsersusernameAppDataLocalMicrosoftWindowsCachesdel/q/s/f C:Users usernameAppDataLocalMicrosoftWindowsINetCachedel/q/s/f C:Users usernameAppDataLocalMicrosoftOffice16.0WEF

In IE, we could flush the local storage and browser cache this way: del /q /s /f C:UsersusernameAppDataLocalMicrosoftWindowsCaches del /q /s /f C:Users usernameAppDataLocalMicrosoftWindowsINetCache del /q /s /f C:Users usernameAppDataLocalMicrosoftOffice16.0WEF

psexec.exe -l c:windowssystem32RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4359

psexec.exe -l c:windowssystem32RunDll32.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.

为了删除Edge缓存,我们试过del/q/s/f C:UsersusernameAppDataLocalPackagesMicrosoft.MicrosoftEdge_8wekyb3d8bbweAC或通过打开 Edge 浏览器端通过 UI 删除缓存.

In order to delete the Edge cache, we tried del /q /s /f C:UsersusernameAppDataLocalPackagesMicrosoft.MicrosoftEdge_8wekyb3d8bbweAC 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%PackagesMicrosoft.Win32WebViewHost_cw5n1h2txyewyAC#!123INetCache

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

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

del /s /f /q %LOCALAPPDATA%PackagesMicrosoft.Win32WebViewHost_cw5n1h2txyewyAC#!123INetCache

在我们的例子中,我们使用 Azure 应用服务 (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天全站免登陆