Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clear cache of browser by command line

I am working in media domain. I need to check every change in all leading browsers i.e. IE, Firefox, Chrome, Safari and Opera.

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?

like image 333
Pradip Avatar asked Sep 27 '12 12:09

Pradip


People also ask

How do I clear Ctrl Alt Del cache?

Keyboard Shortcut for Most Browsers. If you are using Internet Explorer, Edge, Google Chrome, or Mozilla Firefox you can quickly clear cache with a keyboard shortcut. While in your browser, press Ctrl + Shift + Delete simultaneously on the keyboard to open the appropriate window.

What function key clears cache?

cache is done from the Delete Browsing History area. From here, check Temporary Internet files and website files and then click or tap Delete. the Ctrl+Shift+Del keyboard shortcut.


1 Answers

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!

like image 115
Aljaz - aly Avatar answered Sep 19 '22 12:09

Aljaz - aly