bhollin
09-30-2003, 06:59 PM
I have some conditional code in the HEAD that redirects the page if a condition is met. (BTW, location.href and document.location seem equivalent - are they exactly?)
The problem is that while the redirect is happening (could be slow on some PCs or networks), the HTML in the BODY is interpreted and the original page starts to load. So for a second or two the page that I don't want to display is shown before the target URL is displayed.
I would like to add something to my HEAD script that in addition to triggering the location.href redirect also halts execution of the rest of the page. What's the best way to do this?
Thanks.
The problem is that while the redirect is happening (could be slow on some PCs or networks), the HTML in the BODY is interpreted and the original page starts to load. So for a second or two the page that I don't want to display is shown before the target URL is displayed.
I would like to add something to my HEAD script that in addition to triggering the location.href redirect also halts execution of the rest of the page. What's the best way to do this?
Thanks.