The images are not cached on the client, but on the server side.
I assume that you use the method GC.drawImage(Image)
to draw your images in the Canvas. Whenever you create an SWT Image
, a file is created on the server in context/rwt-resources/generated/
. Since the same image may be used from different places, this file is not cleaned up (see Bug 334367: Image#dispose() does not unregister its resource from ResourceManager).
Update
Sorry, I missed that you were talking about the browser cache. Of course, the browser will also cache the images. We can't currently prevent this, because the images are registered as static resources and delivered by the servlet container and we can't control the cache headers.
As a workaround, you might consider to deliver your sensitive images using a service handler and embed it using markup support. There are plans to wrap those external resources in SWT images. If you're interested, please file an enhancement request.