I put together a script that is very similar to the flreamr photostream function. Two thumbnails are next to each other, and when you click the next or previous link, it includes the following (or previous) two images. Cool!
Currently, when loading a page, two images are loaded. When using nxt / prv for the first time, the next two images or the previous two are uploaded via ajax, with the identifier of the first image being passed to url and HTML for two new images returned and displayed via ajax.
simple enough, but it made me think, a slow connection or a heavy server load, and then two images, although relatively small thumbnails may still take some time to load, and nice things with sliding panels are the fact that hidden data glides quickly and smoothly, without delayed downloads.
So, I was interested to know which option is best suited for performance and good practice, this time I can think by opening sentences.
1, call each set of images via JSON (is it supposed to be fast?)
2, load all possible images into a json file and pull the details in that direction - although the browser will still have to load the image. Plus sometimes there can be 4 images, in other cases there can be up to 1000!
3, Upload 10 images via php to Json or another file and upload all 10 images to the browser, hiding 8 that are not displayed, and always show the middle. The problem here is that every time someone clicks, the file must reload the first and last images, which still takes a lot of time, although I believe that medium images will be cached via the browser. But still there is boot time.
4, is it possible to have a json image with all the details of the image (regardless of the number) and use 3 to load 10 of these images, is it possible to use ajax to read 10 lines only and save the pointer from the last one that it read, so the json file can upload fast, short updates and images on both sides are cached via the browser.
Hope it is clear, any suggestions on how you handle this?