|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pre-Loading
Well, just a question. I was wondering is it possible to pre-load a webpage?
Meaning, could I have a page load everything before you see everything, as in you see it all at once...rather than watching a bunch of things load randomly at different times? Sorry for any inconvenience, and thank you in advance in any possible outcome. |
|
#2
|
|||
|
|||
|
You could try to look into...
You could look into JS (JavaScript) it has a preloadfunction, that enables you to preload all sorts of stuf
|
|
#3
|
|||
|
|||
|
Oh. Okay. I was thinking that it might be possible with PHP, since Javascript is Client Side (correct?) :-/.
|
|
#4
|
||||
|
||||
|
The HTML file has to download to the clients machine first. After that, the browser will read through the HTML line by line to find out what assests it needs to download off the server. You can attempt to force the browser to download all assests (images, etc) required as soon as the HTML file has loaded, using the Javascript "onLoad" event handler. This type of preloading can only be done client side, and the user must have JS enabled for it to work.
Server-side "preloading", called caching, is where you cache the output of your often used PHP scripts, to save CPU cycles on the server. |
|
#5
|
|||
|
|||
|
Could you explain the caching please?
|
|
#6
|
||||
|
||||
|
I forgot to mention - non-dynamic assets (*.html, *.gif, *.jpg, etc) assests are cached on the client side by default by the browser.
Re: server-side caching - just google - there's heaps about it. E.g. http://www.sitepoint.com/article/ph...gy-2-5-caching/ http://www.phpbuilder.com/news/item.php?id=174 http://meta.wikipedia.org/wiki/PHP_...nd_optimization |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Pre-Loading |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|