Link to home
Start Free TrialLog in
Avatar of braindude
braindude

asked on

pre-loading a HTML page

How would I 'pre-load' a HTML page without actually displaying the page? Or cant you? Any help would be appreciated...
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

I don't know what purpose it would serv, but you could always lod it to a hidden frame and then swap it in when you were ready by re-writing the innerHTML of the HTML tag of the main page.

Cd&
Avatar of BraveBrain
Or you can place a div layer on top of your page and make that hidden when the document is done loading.
Avatar of Kovis
Kovis

As BraveBrain said, use a div if you want to hide it for a while. Usually you just preload images since they are the heaviest part of the page. Ok, if you have a lot's of tables in your page, it takes some rendering time too. You could try preloading just the images and then render the page if speed is what your after.
Depending on the browser...

Seting up a <link> to the next page in the document head may trigger the browser to preload. I don't know of any browser other then very recent versions of Mozilla which acts on this at the moment.

e.g.
<head>
<title>Chapter 2: Blue Things</title>
<link rel="Next"  href="Chapter3.html">
</head>
ASKER CERTIFIED SOLUTION
Avatar of garethdart24
garethdart24

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of braindude

ASKER

ok..thanks for all the help everyone!
I hardly think I deserve the points for just passing on a link!  But thanks anyway.
As long as it leads to a solution ;-)
If the user gets what they need from a link then that link is just as valuable as code that does the job.  The best conclusion to any quetion is that the poster of the question gets the help they need; whatever the source.  

Good work! :^)

Cd&
Cheers Cd&.  It was just something I'd referenced in a javascript essay from ages ago on my course, and it rung a bell when I read this so I dug it out.

Gareth

PS - did you used to be an expert on askme.com before they closed it down?
Gareth,

Yes, Askme was one of the other sites where I answer Qs.

Cd&
well like they said.. that link was just what I needed to answer my question.... thanks again!!