JBCefBrowser how to use api to clean cache or disable cache like chorme?

Answered

i am developing a idea plugin.     i use jbcef to load a url and display in the toolwindow.    the url page is developing and it always changed.    But in my installed plugin,  the url page always display old page.  I need to reinstall the plugin to display the new page。   i need a api to clean jbcefbrowser cache , Is there any relevant information for reference?

chrome browser has disable cache in the picture

1 comment
Comment actions Permalink

Hi Heu Maning,

Unfortunately, it is not currently possible. You can't pass a custom option to JCEF, because it shares its `CefApp` instance between all the plugins, and there's no API in `JBCefBrowser` to disable the cache. By default it caches in memory (so actually it should be enough to restart the IDE, not re-install your plugin). However, you can try a technique called "cache-busting", you're better to just google the guide, e.g. https://curtistimson.co.uk/post/front-end-dev/what-is-cache-busting

Also, for testing purpose you can use the same DevTools like in Chrome. In 2021.2 just add the VM option:

-Didea.is.internal=true


since 2021.3, switch the registry key:

ide.browser.jcef.contextMenu.devTools.enabled=true

then you'll have `Open DevTools` in the browser context menu,




0

Please sign in to leave a comment.