Re: Does anyone know if I can automate the Firefox Opening and Cache Clearing with Java or Javascript?

JanakiRam <[email protected]> Sun, 24 Jun 2007 08:31:47 -0700
Newsgroups gmane.comp.mozilla.devel.java
Organization http://groups.google.com
Message-ID <1182699107.221693.236800__43742.467792663$1182699321$gmane$org@z28g2000prd.googlegroups.com>
Hi Rafael,

          We can clear the cache using XPCOM Component method. The
following javascript code will clear the cache of the browser.

	const cc = Components.classes;
	const ci = Components.interfaces;
	var cacheService =         cc["@mozilla.org/network/cache-service;
1"].getService(ci.nsICacheService);

		cacheService.evictEntries(ci.nsICache.STORE_ANYWHERE);

     How do you want to automate the cache clearing process.Are you
starting the XUL Application from Java using JavaXPCOM. If this is so
-- place the following code in the XULApplication initialization.



-JanakiRam.


On May 31, 10:45 pm, Rafael <[email protected]> wrote:
> Does anyone know if I can automate the Firefox Opening and Cache
> Clearing with Java or Javascript?
>
> PS.: I don't want to clear the cache providing the application the
> cache files directory, I want to clean accessing the Menu Tools.