Web Technology Basics

A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?

  1. A:8443
  2. B?lang=ja
  3. C#install
Show answer and explanation

Answer: C. #install

This URL consists of the scheme (https), the host name (www.example.com), the port number (8443; if omitted, 443 for https), the path (/docs/guide.html), the query (lang=ja) and the fragment (install). The browser uses the port number to decide where to connect and sends the path and query to the server in the request, but it does not send the fragment after #. The fragment is used only inside the browser, for example to move to the position of the element with id="install" in the page.

  • A. The port number is used to decide where to connect, and a non-default port number is also included in the Host header.
  • B. The query is sent to the server in the request together with the path and is used, for example, as conditions for the server's processing.
  • C. Correct. The fragment is not sent to the server; the browser uses it to indicate a position in the page and the like.
Practice this topic Back to topic

Books on Web Technology Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Web Technology Basics questions

  1. To put the Japanese character "あ" into a URL query, the byte sequence representing it in UTF-8 (E3 81 82) is percent-encoded. Which of the following is the correct result?
  2. A chat app needs to deliver new messages from the server to the browser immediately. Which of the following correctly describes WebSocket?
  3. A merchant's server wants to know immediately when a payment is completed on an online payment service. Which of the following correctly describes the method in which the payment service sends a notification by HTTP POST to a URL the merchant registered in advance (a webhook)?
  4. Which of the following correctly describes the DOM (Document Object Model) used in browsers?
  5. For the element styled with the CSS above, which of the following is the width from the outer edge of the left border to the outer edge of the right border?