测试用到清理浏览器缓存等数据,每次打开要登录测试website。所以写了这个脚本,清理cache, cookie和网站自动保存的数据(特别是在website上search,filter,改动column位置之类)而不动账号信息:
@echo off
echo 正在关闭浏览器Edge, Firefox 和 Chrome(Cloud开头的窗口)...
::关掉edge和Firefox浏览器
taskkill /IM msedge.exe /IM Firefox.exe
::关掉chrome浏览器中标题以Cloud开头的进程,标题名第一位必须写,后面可以*来匹配
taskkill /IM chrome.exe /FI "windowtitle eq Cloud*"
echo 正在清理Edge...
::清理Edge浏览器的chche, cookie, session和local storage,并使用edge打开website。其中local storage会存储一些设置参数,下次打开读取local storage然后打开跟上次关闭前一样的设置。
set edge_cacheFolder=%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Cache
::set edge_codeCacheFolder=%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Code Cache
set edge_sessionFolder=%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Sessions
::set edge_sessionStorageFolder=%userprofile%\AppData\Local\Microsoft\Edge\Us