Page 1 of 1

Preload/Cache image with PHP

Posted: Fri Jul 07, 2006 5:23 pm
by Luke
Is there are way to use PHP instead of javascript to preload/cache images for rollovers and that sort of thing?

Posted: Fri Jul 07, 2006 9:12 pm
by printf
No, only client side scripting can fetch data and store it on your computer in the browsers cache!

pif!

Posted: Fri Jul 07, 2006 9:31 pm
by Luke
:oops: oh... thanks.

Posted: Sat Jul 08, 2006 12:22 am
by feyd
well.. there are a few tricks that don't require Javascript.. but they don't need PHP either. Just some clever HTML and CSS can do it.

Posted: Sat Jul 08, 2006 3:58 pm
by Luke
feyd wrote:well.. there are a few tricks that don't require Javascript.. but they don't need PHP either. Just some clever HTML and CSS can do it.
Really? Do you think you could point me in the right direction?

Posted: Sat Jul 08, 2006 4:06 pm
by Ollie Saunders

Code: Select all

<img src="whatever.jpg" style="display:none" alt="whatever" />
won't be displayed but will load the image. so you can use whatever.jpg later without load.

Posted: Sat Jul 08, 2006 6:19 pm
by Weirdan
Really? Do you think you could point me in the right direction?
http://www.alistapart.com/articles/sprites

Posted: Mon Jul 10, 2006 7:41 pm
by Luke
Weirdan wrote:
Really? Do you think you could point me in the right direction?
http://www.alistapart.com/articles/sprites
That's exremely cool. Thanks!