I am fetching many thumbnails in my application from a database/remote server and loading these in a list View (ul). When there are, around, 100 thumbnails, the overall dowload speed of the webpage is reasonable, but when i am fetching around 250 + thumbnails, the overall download speed is noticeable slower...
I know that I could use pagination, but in my case, that is not an option...
The total number of thumbnails I will end up fetching is around 500... It will not get higher...
My question is the following:
Is there a way I could speed up the fetching of thumbnails in my application? I heard about maybe caching the thumbnails in a file and then calling that file... is that the best solution? if yes, can somebody guide me on that issue...
Any hints? Thank you in advance.
Marco
EDITED
what about using something that i've read... something similar to the following method:
$cache = 'cache/thumbnails.cache.php';
if (!file_exists($cache)) { // check also for the expiration date
echo "this is a cached copy... <br />";
include($cache);
} else
// start the output buffer
ob_start();
// INSERT php script to show thumbnails...
$fh = fopen($cache, 'w+') or die ('Error...');
fwrite($fh, ob_get_contents());
fclose($fh);
// send the output to the browser
ob_end_flush();
}
is that a recommended method?