[thelist] What is the Best Practice for Single Page Redirects?
Jeff Howden
jeff at jeffhowden.com
Thu Jul 10 16:08:30 CDT 2003
ari,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Aredridel
>
> > that depends on the timeout you have set. if it's 0,
> > they won't even see the redirect.
>
> Except as the flash of content before the browser
> figures it out.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
the browser "figures it out" when it encounters the <meta> tag in the
source. if it's up in the head of the document where it belongs the
redirect should be transparent to the user.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> That's why I used "5" in my examples. It still messes
> with navigation, however.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
again, no, it does not.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > > It should not be used with a timeout of zero,
> > > because it makes using the back button on the
> > > browser painful.
> >
> > that simply isn't true. if there's a timeout of 0,
> > the page with the redirect is replaced in the browser
> > history with the page being redirected to. it behaves
> > identically to sending a 302 object moved header from
> > the server.
>
> Not really. Just in newer browsers. . . it's a common
> bug.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
i've been in the business since the days when nn2 was released. i've yet to
find a browser that doesn't behave as i've suggested. or, let me put it
another way. there isn't a browser on the market today that's in the
greater than 1% market share that behaves as you suggest. perhaps you have
a list of data to counter with?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > > The redirect method is better for most other things:
> > > a permanent-redirect code sent to a browser will
> > > allow, say, a browser, to automatically update
> > > bookmarks, [...]
> >
> > if there were any browsers on the market that actually
> > implemented that.
>
> It's being added, and search engines do it already.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
what browsers are adding it? what percentage of market share do they have?
sadly, not all the major search engines update their indexes when they
encounter a redirect.
i'm not saying a server-side redirect isn't the better option. my point is
that some of your reasons for saying it's better don't really have any
substance.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > either way is "proper".
>
> Except that it's metadata more than content, and belongs
> with the header, not the body.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
from a purely theoretical standpoint, i'd agree with you. however, the
<meta> exists for those users that simply don't have the server-side methods
available to them. in their case, there's absolutely nothing wrong or
improperly about using the <meta> tag approach.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > be warned that many browsers don't correctly interpret
> > a 301 status code. even the search engines recommend
> > that you use a 302 if for all redirects.
>
> Yeah -- I browser-sniff and only send when I'm sure.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
yuck, sounds like a maintenance nightmare to me. in your opinion, exactly
what percentage of the market share actually supports a 301 status code?
.jeff
Jeff Howden - Web Application Specialist
Résumé - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/
More information about the thelist
mailing list