views:

9

answers:

0

Hi, all,

I'm working on a web-app project which involves allowing the user to view several hundred small images of roughly the same size, many of them several times. These images are generated on the fly by passing URL strings (specifying height, width, file format, and content) to a service running on an Apache Tomcat server; the URL strings themselves are also generated asynchronously by a query that depends on user input, so I have no idea as to image content or number.

My question is: is it possible to cache these images somewhere (preferably not the server; I don't believe I have enough privileges to do that), and then retrieve them without using the URL string again? Because with the URL-string method, I need to make a new image request to the service each time I want to view an image, since most of them aren't visible (don't exist as javascript objects) at any particular time. But since users of the app might cycle through hundreds of image requests/second, this tends to crash the service even under light use.

Currently, the only solution I can think of is a crude one that involves getting the URLs, calling the image service once for each URL, then "storing" each image as a 1x1 object at the bottom of the page, so that I could resize and move each img to where it needs to be when the user requests it. I'm not sure about the efficiency of this, or even whether the images would only "load" once.

Does anyone have any more efficient/better suggestions as to what I could do to store the images? I apologize beforehand for asking badly; I'm fairly new to web development and server-client interaction, and am basically teaching myself as I go along.

Much thanks.