Quiz

  1. Can you provide examples of when you would use an absolute URL and when you would use a relative URL in a web development project?

    Suppose I'm building that wedding website I was talking about last time. For convenience, I might build it on my laptop, while planning to eventually purchase a domain name, ross-plus-jasmine.org, and move it to some server.

    All of the links will be relative links except for those to external sites (The OC venue they got married in, etc.)

    When I'm ready to move it, an scp -r does the trick, and all the links still work.

  2. How does the use of relative URLs contribute to the maintainability of a website, especially when files need to be moved or reorganized?

    The example above should help. Another example is the pages of this site, which I archive before each time I teach it, but I want the archived version to still work.

  3. I am wondering if the website content changes, will the URL change

    If I change the text/tags on a page, or the CSS, the URLs do not change. But the URLs will change if I change the structure of the site. I did that to my 304 class yesterday...

  4. I have seen / in most web urls, but I've never seen .. in web urls. Are .. used in relative urls only?

    Yes, .. is only used in relative URLs. They are more often found behind the scenes. Do a "view source" on this page, or our lecture pages.

  5. Can you use [..] to specify a destination with URLs?

    Yes.

  6. How do we view URLs from different spaces like VSC?

    I'm sorry, I don't understand this question.

  7. In real life, which type of URL does big companies use more often and why?

    It's an interesting question, but I'm not sure that's really the right question for us as beginning web developers. I think a better question is whether the web developers in industry know both kinds and use them at the appropriate occasions. And the answer to that, of course, is yes.

    Coco Gauff uses topspin more than backspin, but she knows both really well.

  8. I don't have any questions at the moment, the reading was clear.

    I'm glad to hear it!