Re: Allow navigation to relative URLs?

My point was that if this new feature is added to the standard and some
implementations actually implement it, then many other implementations
still won't, for a while. Then the feature won't see much use from those
who care about portability of their code across browsers.

The feature is maybe nice, but it is too easy for me as a user to avoid
using it for the sake of portability of my code, and I would be avoiding
using it until most drivers I know implement it - which will not happen for
a while even it is in the standard.

On Wed, Feb 25, 2015 at 2:38 PM, James Graham <james@hoppipolla.co.uk>
wrote:

> On 25/02/15 18:36, Jason Leyba wrote:
> > Why should this be supported? What is the benefit to the added
> > complexity of translating URLs?
>
> I'm not actually sure it is more complicated. For example if you are
> implementing get by injecting javascript it becomes
>
> function get(url) {
>     window.location = url
> }
>
> rather than
>
> function get(url) {
>     check_url_is_absolute(url);
>     window.location = url;
> }
>
> (where the implementation of check_url_is_absolute is left as an
> exercise for the reader).
>
> I doubt there is a significant compat problem because it seems hard to
> imagine that many people are relying on get() failing for relative URLs;
> they presumably just aren't calling it. The use case is simply reducing
> the amount of url concatenation that has to be done on the client side
> e.g. if you are testing a site on some local server that can run on a
> runtime-specified port it allows you to load a single page with the full
> URL and thereafter always use relative urls for navigation rather than
> having to pass that port all over the code.
>
>

Received on Wednesday, 25 February 2015 22:53:56 UTC