Java implements webbrowser: does this save to browser cache, and can you serve content directly?
Still trying to decide which application will suit : current options JxBrowser vs SWT widget.
Java application implements a webbrowser control like JxBrowser or SWT browser control. Both of these provide options to pass info from java to javascript.
Now I need to know: Is it possible not to save the html/css/javascript file into the cache? Is it possible to have java serve the content as input (looks like this is possible with SWT, unsure of JxBrowser).
Essentially I don't want to have temporary files, either in the cache or i开发者_如何学运维n temp folder, and I want to feed the information from an input stream.
Or do you have to roll/embed your own browser to avoid having all saved to cache?
Perhaps for clarity: I am asking if these two programs offer defined methods when implementing their own browser from within java, to not cache, and if you can stream input directly to serve the html / css/ javascript content.
I understand the no-cache methods in a webbrowser, here I am simply asking whether embedding the browser behaves in the same way. The documentation does not seem very specific about this issue, but perhaps I need to look more.
On further looking it looks like it saves files to cache. Secondly, methods like clearing the cache are so non-specific that if you call clear cache function you happen to have to empty the clients entire cache. Argh....
It's possible to render HTML from memory by SWT Browser
widget. I'm not sure how is it with caching those pages (it may depend on used browser), but it seems reasonable not cache those pages.
See SWT Browser snippets for additional info about rendering HTML from memory.
精彩评论