PDA

View Full Version : pause, then goto new page script?



darco9x2
03-22-2005, 11:06 PM
i have a domain name, and i forgot the user name i used, and the email i used, (because i used to have hotmial, i think the account has been deleted because of inactivity)
so what would the script be to pause loading, and then startloading a new page in the same window? like if you go to askjeeves.com, it takes you to ask.com... any help?
thanks.

mwinter
03-23-2005, 09:05 AM
so what would the script be to pause loading, and then startloading a new page in the same window? like if you go to askjeeves.com, it takes you to ask.com... any help?You shouldn't use a script at all. Redirects such as the one you cite are performed server-side by returning (usually) a 301 status code (Permanent Redirect) and specifying a new URI in the Location response header. This causes the user agent to make another request to the second URI. Unlike 307 (Temporary Redirect), 301 is cacheable and any further references to the original address should automatically be interpreted as the latter.

Though I said server-side, you don't usually go as far as writing a server-side script. With an Apache server, the redirect can be placed in the server configuration proper (httpd.conf), or in a .htaccess file. In either case, the directive could read:


Redirect permanent / http://www.ask.com/Other server types will vary and there are other alternatives, including URL rewriting, but none of them are client-side.

Client-side redirects and META refreshes should never be used to redirect.

Mike