maybe someone has an idea. My application exists of a lot of small images (like a web shop), but unfortunately everytime the images reloaded again and will not be cached (I see this in the “Chrome developer tools”).
I use a FileResource to display the image:
FileResource fr = new FileResource(file)
Image image = new Image();
image.setSource(fr);
layout.addComponent(image);
if you haven’t changed anything in the Chrome dev tools configuration, then you are disabling caching automatically when you open the Dev Tools panel. This is a built-in feature of the Dev Tools and you can toggle it off from the Network tab.
Thanks for the information, but the checkbox “disable cache” is not set, if I open the dev-tools.
What happens, if you open lunchlist. Are the images (after the login) cached?
Do you have the same issue for images which are not coming from a ThemeResource?
The problem ist that some images are stored on the file system and therefore I have no possibility to load these images from the the theme folder? But of couse, I will test it.
I tried to load some images via a ThemeResource, but still no difference in the dev-tools. But you are right, some files (fonts, spinner, etc.) are cached…
It seems that in general it is possible, because loading images from http://demo.vaadin.com/dashboard/#!schedule are coming from cache… Does anyone has a tip to go in the right way to fix this…?