| | |
Dynamic precaching...
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2005
Posts: 1
Reputation:
Solved Threads: 0
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?
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
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
![]() |
Similar Threads
- Dynamic pull out menus (JavaScript / DHTML / AJAX)
- Creating dynamic array structures (C++)
- Dynamic web pages? Which will exist? (IT Professionals' Lounge)
- dynamic IP's and Websites (Domains and DNS)
- Core PHP Programming to Build Dynamic Websites (PHP)
- Dynamic Drive Overlay Win98 80 gig support (Windows 95 / 98 / Me)
Other Threads in the PHP Forum
- Previous Thread: Php-nuke and MySQL trouble
- Next Thread: Site Icon
Views: 2376 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access action ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email error file files folder form forms function functions google header href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql neutrality oop parse paypal pdf php problem query radio random record recursion regex remote script search security select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





