Skip to content
Advertisement

how to clear cache using javascript when starting Offline application

I need a help to clear cache using Javascript, Is it possible to clear cache using Javascript?.

I have developed a Offline Chrome application using Javascript & Node WebKit. When using this application, the cache sizes increasing more day by day.

So I want to delete cache directory or clearing cache from AppData/Local/MyAPP.1.0 whenever I’m starting application.

Kindly help me to clear the cache using Javascript (related solution).

Please let me know, if you need any information on this.

Thanks in advance.

Advertisement

Answer

Try this, It might works

require("nw.gui").App.clearCache();
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement