011020-3

A relative URL is evaluated relative to a base. The method which evaluates a relative URL into an absolute URL takes two parameter values as input, one of them is the relative URL, the other is the base. From which different sources can the value of the base be taken?

Answer

  1. Information inside the document itself, for example a <BASE> element in the <HEAD> of the file containing the URI.
  2. Information in the environment of the document, such as a Content-Base statement in the HTTP response delivering the file.
  3. Use the URI of the referencing file itself, if neither of 1. or 2. provides a base.

List of exam questions