Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ All of the following URLs are relative URLs:
- Scheme-relative URL: `//developer.mozilla.org/en-US/docs/Learn_web_development` — only the protocol is missing. The browser will use the same protocol as the one used to load the document hosting that URL.
- Domain-relative URL: `/en-US/docs/Learn_web_development` — the protocol and the domain name are both missing. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL.
- Sub-resources: `Howto/Web_mechanics/What_is_a_URL` — the protocol and domain name are missing, and the path doesn't begin with `/`. The browser will attempt to find the document in a subdirectory of the one containing the current resource. In this case, we really want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL`.
- Going back in the directory tree: `../CSS/Reference` — the protocol and domain name are missing, and the path begins with `..`. This is inherited from the UNIX file system world — to tell the browser we want to go up by one level. Here we want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/../Web/CSS/Reference`, which can be simplified to: `https://developer.mozilla.org/en-US/docs/Web/CSS/Reference`.
- Going back in the directory tree: `../Web/CSS/Reference` — the protocol and domain name are missing, and the path begins with `..`. This is inherited from the UNIX file system world — to tell the browser we want to go up by one level. Here we want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/../Web/CSS/Reference`, which can be simplified to: `https://developer.mozilla.org/en-US/docs/Web/CSS/Reference`.
- Anchor-only: `#semantic_urls` - all parts are missing except the anchor. The browser will use the current document's URL and replace or add the anchor part to it. This is useful when you want to link to a specific part of the current document.

## URL usernames and passwords
Expand Down