Closed Thread Icon

Topic awaiting preservation: is there a way to preload images with PHP? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=13069" title="Pages that link to Topic awaiting preservation: is there a way to preload images with PHP? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: is there a way to preload images with PHP? <span class="small">(Page 1 of 1)</span>\

 
mas
Paranoid (IV) Inmate

From: the space between us
Insane since: Sep 2002

posted posted 03-02-2004 20:58

hi inmates =)

well, the title says it all, I am looking for a preload-script that works in every browser, even when JS is turned off. This is why I thought of PHP. is there a way?
any advices would be greatly appreciated

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 03-02-2004 21:14

no.




.:[ Never resist a perfect moment ]:.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 03-02-2004 21:16

Do we not have a FAQ about the differences between server and client side scripting?

If we do, I can't find it.



.:[ Never resist a perfect moment ]:.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 03-03-2004 04:29

Here is a very simple way to preload images without javascript (or php) :

<div id="loader" height="1px" style="visibility:hidden">
<img src="pic1.gif" height="1px"width="1px">
<img src="pic2.gif" height="1px"width="1px">
<!--Add all the images you want to preload-->
</div>

put this div at the top or bottom of your page, and your images will be cached. But if the browser doesn't have javascript enabled what are you going to do with those images? The only reason I have preloaded images is for rollovers......

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

mas
Paranoid (IV) Inmate

From: the space between us
Insane since: Sep 2002

posted posted 03-03-2004 21:11

bitdamaged: thx, i know the differences
i just thought that there may be a way
oh and BIG THX, norm, i think that will do the trick
and yes, i have some css rollovers and i would like to preload them. i will try your technique

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 03-03-2004 21:46

There are several ways to have CSS rollovers without the need to preload the rollover images - a simple one is described here:

http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/

and probably many more here:

http://www.google.com/search?q=css+rollover+preloading


kuckus

« BackwardsOnwards »

Show Forum Drop Down Menu