Reputation: 1678
I'm trying to implement a web-app using gwt. I'm using alot of images (read 1000+, about 200mb), in a low-res . I would like the user to be able to choose to either cache the images forever (if its possible), download them as needed, or the user himself has them in his/her PC and points the app to their location, and it uses them instead. So the question is, is it possible using gwt to save a huge cache indefinetly? Or have the user use it's own images instead.
Upvotes: 1
Views: 479
Reputation: 48
You can configure your web server to set the expires headers on the images to a date very far in the future, that will tell the browser to effectively cache the images for 'forever'. This is not really something I would try to do in GWT when the browser can do it for you.
Upvotes: 3
Reputation: 20890
It seems simplest to set the cache headers on the images from your server and let the user's browser do the work. GWT doesn't need to be involved.
If you did want to use GWT and, for example, localStorage, then I think the default maximum on most browsers that support it is 5 MB.
Upvotes: 0