confusion about relative URLs and trailing slash

37 Views Asked by At

In the MDN documentation about URL, the example of relative path appears to conflict with RFC's definition of how to merge a relative path.

A screenshot of the example presented in MDN docs:

enter image description here

RFC 3986 states:

return a string consisting of the reference’s path component appended to all but the last segment of the base URI’s path (i.e., excluding any characters after the right-most “/” in the base URI path, or excluding the entire base URI path if it does not contain any “/” characters).

According to RFC 3986 , the correct full URL should be

https://developer.mozilla.org/en-US/docs/Skills/Infrastructure/Understanding_URLs

instead of

https://developer.mozilla.org/en-US/docs/Learn/Skills/Infrastructure/Understanding_URLs

So what's the answer here?

0

There are 0 best solutions below