silversurfer5150 — 2011-02-17T14:39:34-05:00 — #1
I have been developing for a while now and it recently occured to me that I am unsure of what is happening when a page comes up with "you are being redirected to another page - please click here if you are not redirected automatically". I have used .htacess files before to redirect from index to something with a more SEO friendly name, is this what is happening here. Could anyone clarify this for me?
samanime — 2011-02-17T14:47:36-05:00 — #2
The syntax looks like this:
<meta http-equiv="refresh" content="10;url=http://www.mysite.com/">
Where 10 is the number of seconds to wait.
The .htaccess redirects are server-side and done before anything is every actually sent to the user.
silversurfer5150 — 2011-02-17T15:13:43-05:00 — #3
Thanks for that , I get the technical side of it now but why would you want to hold off on diverting someone for 10 secs?
rguy84 — 2011-02-17T15:33:43-05:00 — #4
To avoid confusion basically.
stevie_d — 2011-02-17T16:06:42-05:00 — #5
It's often used to make it clear to the visitor that the website has moved, which might encourage them to update their bookmarks or any links. It also reduces any confusion or flicker caused by an almost-instant load and change.
It isn't a good idea - 301/302 redirects are a far better choice.
samanime — 2011-02-17T16:46:39-05:00 — #6
Yeah... I agree with Stevie D... it isn't a good idea.
I commonly see it in places like log-in sections of forums. However, it's just a waste of transfer and the users time to actually put that in place. if they just submitted a log-in form and they were taken where they expected, they can probably figure out they were just logged in.
atsea_webdesign — 2011-02-18T09:52:14-05:00 — #7
As Stevie said it's better to use a 301 redirect. That way if the user types in the old URL they will be forwarded to the new site. Chances are they'll never know they've been redirected.
Do you have access to your .htaccess file?
black_max — 2011-02-18T16:24:23-05:00 — #8
The only time I use them is for very temporary situations. For example, I put one up today on a demo site I'm doing for a client. The URL they have is to an obsolete demo. Instead of sending them a new URL and going through the "Why doesn't the [old] link work?" thing, I just redirected them to the new URL using the meta redirect. I'll take it down in a few days and no one will be discomfited or confused. The redirect page takes 1 second to redirect, and has the word "Redirecting ..." on it as its only content.
(First question from one of the client organization's members: "I don't like the site address, it doesn't reflect who we are." The site URL was to a demo page on my site. If you have more tech-savvy clients, you won't need to go to these lengths.)