To display a dynamically loaded image in my webapp I'm using a BufferedDynamicImageResource
. (It just loads the image from a backend server based on an database id.)
The URL of the image resource ends up as:
http://localhost:8080/wicket/page?17-IResourceListener-logotype
^^
sequence number
where the sequence number increases for each such image I generate.
The problem is that the URL is reused from execution to execution (the sequence number is reset to 0) so when I restart the server the browser does not fetch the newly generated images, but instead uses the cached versions (which were generated last execution of the webapp).
My Question: What is the best way to avoid this behavior? (If I could for instance add the database id of the image which is loaded to the URL, everything would work fine.)