Quiz

  1. Is there only one absolute URL in a webpage?

    There's only one absolute URL *for* a webpage (it's location), but that webpage can link to lots and lots of other pages.

    Here are two just for this quiz:

    The New York Times

    The Washington Post

  2. Can you explain more about whether to use an absolute or a relative URL when two files are on the same server?

    If they are on different servers, you must use an absolute URL.

    When they are on the same server, you have a choice.

    All of our discussion is about how to make that choice.

  3. What if the referenced file moves but not the referring file? Is an absolute URL still more useful in this case or is it a matter of continuously checking is the "destination" is still the same?

    Great question! You have gotten to the heart of the issue: the relative URLs are for when the two files move together.

    That is commonly the case, but it might not always so.

    If one file moves but not the other, the relative URL no longer works.

    In that case, an absolute URL might be better (though if the referenced file is the one that moves, then neither will work.

  4. Could you give more examples to explain the advantages and disadvantages of both absolute URLs and relative URLs?

    Sure, but they all boil down to the same issue: whether the hierarchical relationship between two files is going to be maintained or not.

    One I ran into myself is when I archived versions of course accounts (say cs204 as cs204F24). Seems like a good thing to do, but sometimes I or my colleagues would have absolute URLs and then the archived referrer is pointing to a file in the current version instead of in the archived version.

    I'll draw that out.

  5. No questions, but I love the Science building metaphor!

    I'm so glad!