Hello,
I hope you can help - I'm a bit new to PHP.
My basic problem is with a page (HTML) which is intended to display an
image slideshow. On this page there are a number of links to click
(one for each slideshow topic) and a "TV screen" to view the results.
The images are stored on the server as (big) JPG files - and when they
are downloaded for the slideshow, I resize them with a PHP script
"im.php" :
$filename = $_GET['filename'];
header('Content-type: image/jpeg');
..
..... open $filename & do the resizing
..
imagejpeg( ...
After a link is selected, I preload the set of images with Javascript
by doing :
im[i].src = "php/im.php?filename =" + getFName(i); // for each in the
set
where getFname(i) returns the i'th image in the set.
I then start the slideshow (I've got things in the Javascript to make
sure all images are preloaded before starting)
Now, my problem is that the browser doesn't seem to be caching the
images and keeps making server requests during the slidehow (which
rather defeats the idea of pre-loading)
If I "cheat" and replace the preloading with :
im[i] = getFName(i);
it works fine (i.e I can switch the server off & it continues to show
the slideshow).
This happens with all browsers I've tried (IE6, Firefox, Netscape)
Hope all this makes sense & would appreciate your expert advice.
Mr WZ Boson
I hope you can help - I'm a bit new to PHP.
My basic problem is with a page (HTML) which is intended to display an
image slideshow. On this page there are a number of links to click
(one for each slideshow topic) and a "TV screen" to view the results.
The images are stored on the server as (big) JPG files - and when they
are downloaded for the slideshow, I resize them with a PHP script
"im.php" :
$filename = $_GET['filename'];
header('Content-type: image/jpeg');
..
..... open $filename & do the resizing
..
imagejpeg( ...
After a link is selected, I preload the set of images with Javascript
by doing :
im[i].src = "php/im.php?filename =" + getFName(i); // for each in the
set
where getFname(i) returns the i'th image in the set.
I then start the slideshow (I've got things in the Javascript to make
sure all images are preloaded before starting)
Now, my problem is that the browser doesn't seem to be caching the
images and keeps making server requests during the slidehow (which
rather defeats the idea of pre-loading)
If I "cheat" and replace the preloading with :
im[i] = getFName(i);
it works fine (i.e I can switch the server off & it continues to show
the slideshow).
This happens with all browsers I've tried (IE6, Firefox, Netscape)
Hope all this makes sense & would appreciate your expert advice.
Mr WZ Boson
Comment