2 ms·
I agree with nearly all of these, and I even agree with this point: Conscious of trailing slashes... Redirect to preferred form. The interleaved explanation,
by jessaustin 14y ago
I agree with nearly all of these, and I even agree with this point:
Conscious of trailing slashes... Redirect to preferred form.
The interleaved explanation, however, is problematic:
Stick with trailing slashes or no trailing slashes.
A trailing slash indicates a resource that is in some sense a container. (Historically one would have called this a directory.) The browser knows that '.' refers to the current resource with a trailing slash, while it refers to the parent resource path when the current resource doesn't have a trailing slash. You want to leave off the slash when you know a particular resource is a leaf node.
I actually wouldn't have a problem with advice to "stick with trailing slashes", but I don't think "no trailing slash" would be a sustainable policy. It would be too difficult to keep URLs straight between the server and the browser side.