通过命令行清除浏览器的缓存 [英] clear cache of browser by command line
问题描述
我在媒体领域工作。我需要检查所有主流浏览器的每一个变化,ie IE,Firefox,Chrome,Safari和Opera。
I am working in media domain. I need to check every change in all leading browsers i.e. IE, Firefox, Chrome, Safari and Opera.
要清除缓存,每次我需要使用Ctrl + Shift + del。
To clear cache, every time i need to use Ctrl + Shift + del.
有没有其他方法可以使用命令行清除每个网络浏览器的缓存?
Is there any another way to clear the cache of every web browser using command line?
推荐答案
这里是如何清除所有垃圾桶&通过命令行缓存(浏览器中没有其他私有数据)。这是一个处理所有垃圾桶的命令行批处理脚本(截至2014年4月):
Here is how to clear all trash & caches (without other private data in browsers) by a command line. This is a command line batch script that takes care of all trash (as of April 2014):
erase "%TEMP%\*.*" /f /s /q
for /D %%i in ("%TEMP%\*") do RD /S /Q "%%i"
erase "%TMP%\*.*" /f /s /q
for /D %%i in ("%TMP%\*") do RD /S /Q "%%i"
erase "%ALLUSERSPROFILE%\TEMP\*.*" /f /s /q
for /D %%i in ("%ALLUSERSPROFILE%\TEMP\*") do RD /S /Q "%%i"
erase "%SystemRoot%\TEMP\*.*" /f /s /q
for /D %%i in ("%SystemRoot%\TEMP\*") do RD /S /Q "%%i"
@rem Clear IE cache - (Deletes Temporary Internet Files Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
erase "%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*") do RD /S /Q "%%i"
@rem Clear Google Chrome cache
erase "%LOCALAPPDATA%\Google\Chrome\User Data\*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%\Google\Chrome\User Data\*") do RD /S /Q "%%i"
@rem Clear Firefox cache
erase "%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*") do RD /S /Q "%%i"
pause
我很相信它会运行一段时间,当你第一次运行:)
享受!
I am pretty sure it will run for some time when you first run it :) Enjoy!
这篇关于通过命令行清除浏览器的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!