Hi,

I have image resources which fetch the proper thumbnail picture stored in a DB based on the image's file name. I used the file name instead of parameters to make sure client-side caching would work. By chance, I just discovered that the images are always reloaded on ajax requests.

This is caused by Image#shouldAddAntiCacheParameter and Image#addAntiCacheParameter which always add an "anticache" parameter to image src URLs on ajax requests.

In my case, the images are added to ajax requests as part of a table update containing lots of thumbnails so it's definitely counter-productive. I can see the need for anticaching for dynamically generated images which change per request, but should this be the default behavior?

Of course, I can easily work around this issue by subclassing Image, but I wanted to bring this to attention. At the very least, I would suggest creating a subclass (CachingImage?) of Image in core which does not do anticaching for stateless resource references.

Regards,
Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to