Dynamic precaching...

Reply

Join Date: Jan 2005
Posts: 1
Reputation: weexpectedthis is an unknown quantity at this point 
Solved Threads: 0
weexpectedthis weexpectedthis is offline Offline
Newbie Poster

Dynamic precaching...

 
0
  #1
Jan 26th, 2005
Does anyone know how one would go about precaching some images for a page I'm creating? The trick is, I only know which pictures to precache at the very top of the script, so the list can't be stored in a .js file like normal. Since there are different pictures for different users, the script needs to precache the pictures dynamically. Anyone know how to?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: Dynamic precaching...

 
0
  #2
Jan 28th, 2005
I don't think you can do this with PHP, as PHP is a server side scripting language... that is too say every thing that PHP does is on the server not on the client aka the end user's computer. What you are talking about sounds like JavaScript but then you said no js because you vary your list...

the compromise:
why not generate several different js files and use a switch statement in PHP to dertemine which js file to load based on whatever permissions the user has

OR

you can be very fancy and use PHP to auto-generate your js files ... just make sure to output the correct headers so that your browser knows to read it as a js file and not a php file
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 2376 | Replies: 1
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC