Re: Creative (?) solution for redundant links

 "David Woolley" <david@djwhome.demon.co.uk>

> > location="newlocation.html"
> >
> > Is safe in that it will not error in any browser I know of, and it
will
>
> Although pages that redirect on entry fail some of the WCAG guidelines,
> location.replace(....) is better in that context as, to the extent it
> works

On entry certainly location.replace is superior, and checking it exists
first with
if (location && location.replace) location.replace(...)

> and this sort of redirect is often the result of browser
> sniffing

Which is such a flawed technique that there's never a scenario where it's
sensible.

> it doesn't break the back button.

That depends how you define break of course, I'd still say it does, but
then in my browser location.replace doe cause a history entry - perhaps
for most though it's more appropriate.

>  Obviously, if you are
> simulating a real link, you do want to push the history stack, so
> this is not appropriate in that context.

Indeed, People shouldn't really be using javascript unless they can
appreciate this things...

Jim.

Received on Tuesday, 12 March 2002 19:13:40 UTC